1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-25 06:52:50 +08:00

Fix: handle island level up in project

This commit is contained in:
2025-10-19 11:36:05 +08:00
parent 1a6cb6bc66
commit cc1d411994
2 changed files with 18 additions and 7 deletions

View File

@@ -288,7 +288,7 @@ class IslandTransportRun(IslandUI):
self.device.click_record_clear()
self.interval_clear([GET_ITEMS_ISLAND, TRANSPORT_RECEIVE, POPUP_CANCEL_WHITE])
success = True
click_timer = Timer(5)
click_timer = Timer(5, count=10)
confirm_timer = Timer(1, count=2).start()
while 1:
if skip_first_screenshot:
@@ -302,6 +302,7 @@ class IslandTransportRun(IslandUI):
if self.appear_then_click(TRANSPORT_RECEIVE, offset=(-20, -20, 20, 400), interval=2):
success = False
click_timer.reset()
confirm_timer.reset()
continue
@@ -314,18 +315,19 @@ class IslandTransportRun(IslandUI):
confirm_timer.reset()
continue
if self.island_in_transport():
if success and confirm_timer.reached():
break
else:
confirm_timer.reset()
# handle island level up
if click_timer.reached():
success = True
self.device.click(GET_ITEMS_ISLAND)
self.device.sleep(0.3)
click_timer.reset()
continue
if self.island_in_transport():
if success and confirm_timer.reached():
break
else:
confirm_timer.reset()
return success