feat: add idle reward claim automation

This commit is contained in:
admin committed 2026-10-04 18:50:28 +08:00
1 parent 48d5f63e36
commit 8479cf4981
12 files changed
+228 -12

No files matched your search

+2 -2
View File
@@ -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.