1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-24 11:19:03 +08:00

Fix: Entered wrong sub-page in meowfficer (fixed #1513)

This commit is contained in:
LmeSzinc
2022-08-21 00:05:42 +08:00
parent eb1e43dd52
commit 190d934538
4 changed files with 36 additions and 10 deletions

View File

@@ -21,6 +21,38 @@ class MeowfficerBase(UI):
return False
def meow_enter(self, click_button, check_button, skip_first_screenshot=True):
"""
Enters sub-page, handle MEOWFFICER_INFO and mistaken clicks
Pages:
in: page_meowfficer
out: check_button
"""
accident_page = [MEOWFFICER_TRAIN_START, MEOWFFICER_BUY, MEOWFFICER_FORT_CHECK]
accident_page = [page for page in accident_page if page != check_button]
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
else:
self.device.screenshot()
self.appear_then_click(MEOWFFICER_TRAIN_ENTER, offset=(20, 20), interval=5)
# End
if self.appear(check_button, offset=(20, 20)):
break
# Click
if self.appear_then_click(click_button, offset=(20, 20), interval=3):
continue
# Accident click
if self.meow_additional():
continue
for button in accident_page:
if self.appear(button, offset=(20, 20), interval=3):
self.device.click(MEOWFFICER_CHECK)
self.interval_clear(click_button)
break
def meow_menu_close(self, skip_first_screenshot=True):
"""
Exit from any meowfficer menu popups