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

Fix: Handle EXERCISE_PREPARATION in ui switches

This commit is contained in:
LmeSzinc
2023-02-26 17:20:37 +08:00
parent 8b6a68651a
commit cca3de7e77

View File

@@ -1,10 +1,11 @@
from module.base.button import Button
from module.base.decorator import run_once
from module.base.timer import Timer
from module.freebies.assets import PURCHASE_POPUP
from module.combat.assets import GET_ITEMS_1, GET_SHIP
from module.exception import (GameNotRunningError, GamePageUnknownError,
RequestHumanTakeover)
from module.exercise.assets import EXERCISE_PREPARATION
from module.freebies.assets import PURCHASE_POPUP
from module.handler.assets import (AUTO_SEARCH_MENU_EXIT, BATTLE_PASS_NOTICE,
GAME_TIPS, LOGIN_ANNOUNCE,
LOGIN_CHECK, LOGIN_RETURN_SIGN,
@@ -550,6 +551,12 @@ class UI(InfoHandler):
if self.appear_then_click(LOGIN_CHECK, offset=(30, 30), interval=3):
return True
# Mistaken click
if self.appear(EXERCISE_PREPARATION, interval=3):
logger.info(f'UI additional: {EXERCISE_PREPARATION} -> {GOTO_MAIN}')
self.device.click(GOTO_MAIN)
return True
return False
def ui_button_interval_reset(self, button):