mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-15 11:43:08 +08:00
Fix: wait_until_manjuu_disappear should wait at least 1.5s (#5093)
* Fix: wait_until_manjuu_disappear should wait at least 1.5s * Opt: allow manjuu loading until stuck long but not normal stuck
This commit is contained in:
@@ -67,7 +67,7 @@ class Device(Screenshot, Control, AppControl):
|
|||||||
click_record = collections.deque(maxlen=15)
|
click_record = collections.deque(maxlen=15)
|
||||||
stuck_timer = Timer(60, count=60).start()
|
stuck_timer = Timer(60, count=60).start()
|
||||||
stuck_timer_long = Timer(180, count=180).start()
|
stuck_timer_long = Timer(180, count=180).start()
|
||||||
stuck_long_wait_list = ['BATTLE_STATUS_S', 'PAUSE', 'LOGIN_CHECK']
|
stuck_long_wait_list = ['BATTLE_STATUS_S', 'PAUSE', 'LOGIN_CHECK', 'TEMPLATE_MANJUU']
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
for trial in range(4):
|
for trial in range(4):
|
||||||
|
|||||||
@@ -560,10 +560,17 @@ class InfoHandler(ModuleBase):
|
|||||||
"""
|
"""
|
||||||
Wait until manjuu loading disappear.
|
Wait until manjuu loading disappear.
|
||||||
"""
|
"""
|
||||||
|
# Abuse of notation. Template do not have readable name, so add string here.
|
||||||
|
self.device.stuck_record_add('TEMPLATE_MANJUU')
|
||||||
|
timer = Timer(1.5, count=3).start()
|
||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
if not self.manjuu_count():
|
if self.manjuu_count():
|
||||||
break
|
timer.reset()
|
||||||
|
else:
|
||||||
|
if timer.reached():
|
||||||
|
logger.info(f'Manjuu disappeared')
|
||||||
|
break
|
||||||
|
|
||||||
def handle_manjuu(self):
|
def handle_manjuu(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user