mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Add: Game stuck handler
- Add ensure game running when running alas functions
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from module.base.timer import Timer
|
||||
from module.base.utils import get_color
|
||||
from module.device.app import AppControl
|
||||
from module.device.control import Control
|
||||
from module.device.screenshot import Screenshot
|
||||
from module.exception import GameStuckError
|
||||
from module.handler.assets import GET_MISSION
|
||||
from module.logger import logger
|
||||
from module.base.utils import get_color
|
||||
|
||||
|
||||
class Device(Screenshot, Control, AppControl):
|
||||
@@ -107,3 +108,6 @@ class Device(Screenshot, Control, AppControl):
|
||||
logger.warning('Wait too long')
|
||||
logger.warning(f'Waiting for {self.stuck_record}')
|
||||
self.stuck_record_clear()
|
||||
|
||||
if self.config.ENABLE_GAME_STUCK_HANDLER:
|
||||
raise GameStuckError(f'Waiting for {self.stuck_record}')
|
||||
|
||||
Reference in New Issue
Block a user