1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-28 03:09:42 +08:00

Fix: island project complete

This commit is contained in:
2025-11-24 14:35:19 +08:00
parent 4ba3c1b943
commit b93d0c1706

View File

@@ -324,7 +324,6 @@ class IslandProjectRun(IslandUI):
success = False success = False
enter = True enter = True
click_timer = Timer(5, count=10).start() click_timer = Timer(5, count=10).start()
timeout = Timer(3, count=6).start()
while 1: while 1:
if skip_first_screenshot: if skip_first_screenshot:
skip_first_screenshot = False skip_first_screenshot = False
@@ -334,40 +333,34 @@ class IslandProjectRun(IslandUI):
if self.island_in_management(interval=5): if self.island_in_management(interval=5):
self.device.click(button) self.device.click(button)
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if self.appear_then_click(ISLAND_MANAGEMENT, offset=(20, 20), interval=2): if self.appear_then_click(ISLAND_MANAGEMENT, offset=(20, 20), interval=2):
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if self.handle_info_bar(): if self.handle_info_bar():
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if enter and self.appear_then_click(ROLE_SELECT_ENTER, offset=(5, 5), interval=2): if enter and self.appear_then_click(ROLE_SELECT_ENTER, offset=(5, 5), interval=2):
success = True success = True
self.interval_clear(GET_ITEMS_ISLAND) self.interval_clear(GET_ITEMS_ISLAND)
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if self.appear_then_click(PROJECT_COMPLETE, offset=(20, 20), interval=2): if self.appear_then_click(PROJECT_COMPLETE, offset=(20, 20), interval=1):
success = True success = True
enter = False enter = False
self.interval_clear(GET_ITEMS_ISLAND) self.interval_clear(GET_ITEMS_ISLAND)
self.interval_reset(ROLE_SELECT_ENTER) self.interval_reset(ROLE_SELECT_ENTER)
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if self.handle_get_items(): if self.handle_get_items():
enter = True enter = True
self.interval_clear(ROLE_SELECT_ENTER) self.interval_clear(ROLE_SELECT_ENTER)
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
# handle island level up # handle island level up
@@ -375,13 +368,10 @@ class IslandProjectRun(IslandUI):
self.device.click(GET_ITEMS_ISLAND) self.device.click(GET_ITEMS_ISLAND)
self.device.sleep(0.3) self.device.sleep(0.3)
click_timer.reset() click_timer.reset()
timeout.reset()
continue continue
if self.appear(ROLE_SELECT_CONFIRM, offset=(20, 20)): if self.appear(ROLE_SELECT_CONFIRM, offset=(20, 20)):
break break
if timeout.reached():
break
if not success: if not success:
product = IslandProduct(self.device.image) product = IslandProduct(self.device.image)