mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-19 23:33:33 +08:00
Fix: Delay the wrong task after restart (#755)
This commit is contained in:
6
alas.py
6
alas.py
@@ -110,6 +110,10 @@ class AzurLaneAutoScript:
|
|||||||
from module.handler.login import LoginHandler
|
from module.handler.login import LoginHandler
|
||||||
LoginHandler(self.config, device=self.device).app_restart()
|
LoginHandler(self.config, device=self.device).app_restart()
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
from module.handler.login import LoginHandler
|
||||||
|
LoginHandler(self.config, device=self.device).app_start()
|
||||||
|
|
||||||
def goto_main(self):
|
def goto_main(self):
|
||||||
from module.ui.ui import UI
|
from module.ui.ui import UI
|
||||||
UI(self.config, device=self.device).ui_goto_main()
|
UI(self.config, device=self.device).ui_goto_main()
|
||||||
@@ -284,7 +288,7 @@ class AzurLaneAutoScript:
|
|||||||
logger.info('Close game during wait')
|
logger.info('Close game during wait')
|
||||||
self.device.app_stop()
|
self.device.app_stop()
|
||||||
self.wait_until(task.next_run)
|
self.wait_until(task.next_run)
|
||||||
self.run('restart')
|
self.run('start')
|
||||||
elif method == 'goto_main':
|
elif method == 'goto_main':
|
||||||
logger.info('Goto main page during wait')
|
logger.info('Goto main page during wait')
|
||||||
self.run('goto_main')
|
self.run('goto_main')
|
||||||
|
|||||||
@@ -97,6 +97,16 @@ class LoginHandler(Combat):
|
|||||||
logger.critical('Azur Lane server may be under maintenance, or you may lost network connection')
|
logger.critical('Azur Lane server may be under maintenance, or you may lost network connection')
|
||||||
raise RequestHumanTakeover
|
raise RequestHumanTakeover
|
||||||
|
|
||||||
|
def app_stop(self):
|
||||||
|
logger.hr('App stop')
|
||||||
|
self.device.app_stop()
|
||||||
|
|
||||||
|
def app_start(self):
|
||||||
|
logger.hr('App start')
|
||||||
|
self.device.app_start()
|
||||||
|
self.handle_app_login()
|
||||||
|
# self.ensure_no_unfinished_campaign()
|
||||||
|
|
||||||
def app_restart(self):
|
def app_restart(self):
|
||||||
logger.hr('App restart')
|
logger.hr('App restart')
|
||||||
self.device.app_stop()
|
self.device.app_stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user