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

Fix: Trigger device stuck detection in semi auto

- Add disable_stuck_detection to disable that
This commit is contained in:
LmeSzinc
2021-01-09 18:33:10 +08:00
parent 4d25a316b8
commit 7506a1bc28
4 changed files with 13 additions and 5 deletions

View File

@@ -110,6 +110,16 @@ class Device(Screenshot, Control, AppControl):
if self.config.ENABLE_GAME_STUCK_HANDLER:
raise GameStuckError(f'Wait too long')
def disable_stuck_detection(self):
"""
Disable stuck detection and its handler. Usually uses in semi auto and debugging.
"""
def empty_function(*arg, **kwargs):
return False
self.click_record_check = empty_function
self.stuck_record_check = empty_function
def app_start(self):
super().app_start()
self.stuck_record_clear()