1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-06-15 22:47:55 +08:00
This commit is contained in:
2026-06-14 12:21:28 +08:00
11 changed files with 39 additions and 24 deletions

View File

@@ -200,24 +200,30 @@ class InfoHandler(ModuleBase):
return False
if self.appear(USE_DATA_KEY, offset=(20, 20)):
skip_first_screenshot = True
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
else:
self.device.screenshot()
# enable USE_DATA_KEY_NOTIFIED
for _ in self.loop():
enabled = self.image_color_count(
USE_DATA_KEY_NOTIFIED, color=(140, 207, 66), threshold=180, count=10)
if enabled:
break
if self.appear(USE_DATA_KEY, offset=(20, 20), interval=5):
self.device.click(USE_DATA_KEY_NOTIFIED)
continue
self.config.USE_DATA_KEY = False # Reset on success as task can be stopped before can be recovered
return self.handle_popup_confirm('USE_DATA_KEY')
# click confirm
# POPUP_CONFIRM from data key page has minor differece from the standard one
# so we just bind clicking it
self.interval_clear(USE_DATA_KEY, interval=5)
for _ in self.loop():
if not self.appear(USE_DATA_KEY, offset=(20, 20)):
break
if self.appear(USE_DATA_KEY, offset=(20, 20), interval=5):
self.device.click(POPUP_CONFIRM)
continue
return True
return False
@@ -550,4 +556,4 @@ class InfoHandler(ModuleBase):
self.wait_until_manjuu_disappear()
return True
else:
return False
return False