mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:27:33 +08:00
Fix: Delay the wrong task after restart (#755)
This commit is contained in:
parent
4e87034b4e
commit
790515c800
6
alas.py
6
alas.py
@ -110,6 +110,10 @@ class AzurLaneAutoScript:
|
||||
from module.handler.login import LoginHandler
|
||||
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):
|
||||
from module.ui.ui import UI
|
||||
UI(self.config, device=self.device).ui_goto_main()
|
||||
@ -284,7 +288,7 @@ class AzurLaneAutoScript:
|
||||
logger.info('Close game during wait')
|
||||
self.device.app_stop()
|
||||
self.wait_until(task.next_run)
|
||||
self.run('restart')
|
||||
self.run('start')
|
||||
elif method == 'goto_main':
|
||||
logger.info('Goto main page during wait')
|
||||
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')
|
||||
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):
|
||||
logger.hr('App restart')
|
||||
self.device.app_stop()
|
||||
|
Loading…
Reference in New Issue
Block a user