feat: add idle reward claim automation
This commit is contained in:
1 parent
48d5f63e36
commit
8479cf4981
12 files changed
+228
-12
No files matched your search
@@ -87,7 +87,7 @@ class Desktop:
|
||||
def screenshot(self):
|
||||
return self.api.screenshot()
|
||||
|
||||
def click(self, point, region, screenshot_size):
|
||||
def click(self, point, region, screenshot_size, hold=0.2):
|
||||
from .permissions import mouse_permission_granted
|
||||
if not mouse_permission_granted():
|
||||
raise WorkflowError(
|
||||
@@ -100,7 +100,7 @@ class Desktop:
|
||||
self.api.mouseDown()
|
||||
try:
|
||||
# The game did not react to instant down/up in the live test.
|
||||
time.sleep(0.2)
|
||||
time.sleep(hold)
|
||||
finally:
|
||||
# Always release, including if the pointer moved to a failsafe
|
||||
# corner during the hold. Restore the guard immediately afterward.
|
||||
|
||||
Reference in new issue
Block a user