1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-08-15 11:43:08 +08:00

Add: [CN, JP] island pages

This commit is contained in:
guoh064
2026-06-14 00:20:19 +08:00
parent 5496207c65
commit 3ec817ffb9
36 changed files with 72 additions and 1 deletions

View File

@@ -239,6 +239,7 @@ class UI(InfoHandler):
self.interval_clear(list(Page.iter_check_buttons()))
logger.hr(f"UI goto {destination}")
island_page_detected = False
while 1:
GOTO_MAIN.clear_offset()
if skip_first_screenshot:
@@ -249,6 +250,7 @@ class UI(InfoHandler):
# Destination page
if self.ui_page_appear(page=destination, offset=offset):
logger.info(f'Page arrive: {destination}')
self.ui_current = destination
break
# Other pages
@@ -257,6 +259,8 @@ class UI(InfoHandler):
if page.parent is None or page.check_button is None:
continue
if self.appear(page.check_button, offset=offset, interval=5):
self.ui_current = page
island_page_detected = page.is_island() or page.parent.is_island()
logger.info(f'Page switch: {page} -> {page.parent}')
button = page.links[page.parent]
self.device.click(button)
@@ -267,7 +271,7 @@ class UI(InfoHandler):
continue
# Additional
if self.ui_additional(get_ship=get_ship):
if self.ui_additional(get_ship=get_ship and not island_page_detected):
continue
# Reset connection