1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-10 02:34:51 +00:00

fix: exit emulator, aas, shutdown

allow tactical challenge to be completed
This commit is contained in:
RedDeadDepresso
2024-01-06 19:29:47 +00:00
committed by YoursFunny
parent ec543c6db2
commit 659172cdd3
2 changed files with 32 additions and 13 deletions
+31 -12
View File
@@ -233,21 +233,40 @@ class AzurLaneAutoScript:
del_cached_property(self, 'config')
continue
elif method == 'exit_aas':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_aas()
exit(1)
if abs(task.next_run - datetime.now()) >= timedelta(minutes=2): # ensure tactical challenge is fully ran
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_aas()
exit(1)
release_resources()
self.device.release_during_wait()
if not self.wait_until(task.next_run):
del_cached_property(self, 'config')
continue
elif method == 'exit_emulator':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_emulator()
exit(1) # stops AAS from restarting emulator
if abs(task.next_run - datetime.now()) >= timedelta(minutes=2):
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_emulator()
exit(1) # stops AAS from restarting emulator
release_resources()
self.device.release_during_wait()
if not self.wait_until(task.next_run):
del_cached_property(self, 'config')
continue
elif method == 'exit_aas_emulator':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_emulator()
self.exit_aas()
exit(1)
if abs(task.next_run - datetime.now()) >= timedelta(minutes=2):
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_emulator()
self.exit_aas()
exit(1)
release_resources()
self.device.release_during_wait()
if not self.wait_until(task.next_run):
del_cached_property(self, 'config')
continue
elif method == 'shutdown':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.shutdown()
if abs(task.next_run - datetime.now()) >= timedelta(minutes=2):
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.shutdown()
release_resources()
self.device.release_during_wait()
if not self.wait_until(task.next_run):