mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-16 08:03:32 +08:00
Opt: Ensure game running when task queue empty and going to page_main
This commit is contained in:
4
alas.py
4
alas.py
@@ -119,7 +119,10 @@ class AzurLaneAutoScript:
|
|||||||
LoginHandler(self.config, device=self.device).app_start()
|
LoginHandler(self.config, device=self.device).app_start()
|
||||||
|
|
||||||
def goto_main(self):
|
def goto_main(self):
|
||||||
|
from module.handler.login import LoginHandler
|
||||||
from module.ui.ui import UI
|
from module.ui.ui import UI
|
||||||
|
if not self.device.app_is_running():
|
||||||
|
LoginHandler(self.config, device=self.device).app_start()
|
||||||
UI(self.config, device=self.device).ui_goto_main()
|
UI(self.config, device=self.device).ui_goto_main()
|
||||||
|
|
||||||
def research(self):
|
def research(self):
|
||||||
@@ -324,6 +327,7 @@ class AzurLaneAutoScript:
|
|||||||
self.run('goto_main')
|
self.run('goto_main')
|
||||||
self.wait_until(task.next_run)
|
self.wait_until(task.next_run)
|
||||||
elif method == 'stay_there':
|
elif method == 'stay_there':
|
||||||
|
logger.info('Stay there during wait')
|
||||||
self.wait_until(task.next_run)
|
self.wait_until(task.next_run)
|
||||||
else:
|
else:
|
||||||
logger.warning(f'Invalid Optimization_WhenTaskQueueEmpty: {method}, fallback to stay_there')
|
logger.warning(f'Invalid Optimization_WhenTaskQueueEmpty: {method}, fallback to stay_there')
|
||||||
|
|||||||
Reference in New Issue
Block a user