1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-01-07 14:05:12 +00:00

Compare commits

..

No commits in common. "47f87741fd7d590b47d5cdbf29264b4b99fc0005" and "524f15e2bf821eb87ab225c48b0da06775761e86" have entirely different histories.

7 changed files with 12 additions and 21 deletions

View File

@ -13,7 +13,4 @@ class CTkAddButton(customtkinter.CTkFrame):
def set_button(self, value):
self.option_menu.set("")
self.button.configure(text=value)
def configure(self, *args, **kwargs):
self.button.configure(*args, **kwargs)
self.button.configure(text=value)

View File

@ -233,20 +233,17 @@ class AzurLaneAutoScript:
del_cached_property(self, 'config')
continue
elif method == 'exit_aas':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.exit_aas()
exit(1)
elif method == 'exit_emulator':
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)
exit(0)
elif method == 'shutdown':
self.config.Optimization_WhenTaskQueueEmpty = 'goto_main'
self.shutdown()
release_resources()
self.device.release_during_wait()
@ -341,7 +338,7 @@ class AzurLaneAutoScript:
from module.device.platform.platform_windows import PlatformWindows
PlatformWindows(self.config).emulator_stop()
except:
logger.error("Failed to stop emulator. It may be due to a lack of administrator privileges.")
logger.error("Failed to stop emulator. It may be due to a lack of administrator privileges or incorrect input in Emulator Settings.")
def exit_aas(self):
if self.operating_system != 'Windows':
@ -355,7 +352,7 @@ class AzurLaneAutoScript:
def shutdown(self):
if self.operating_system not in ["Windows", "Linux", "Darwin"]:
logger.error("Shutdown set during wait but operating system not supported")
logger.info("Shutdown set during wait but operating system not supported")
else:
logger.info('Shutdown during wait')
try:

View File

@ -130,7 +130,6 @@
"goto_main",
"close_game",
"exit_aas",
"exit_emulator",
"exit_aas_emulator",
"shutdown"
]

View File

@ -71,7 +71,7 @@ Optimization:
CombatScreenshotInterval: 1.0
WhenTaskQueueEmpty:
value: goto_main
option: [ stay_there, goto_main, close_game, exit_aas, exit_emulator, exit_aas_emulator, shutdown ]
option: [ stay_there, goto_main, close_game, exit_aas, exit_aas_emulator, shutdown ]
# ==================== Daily ====================

View File

@ -37,7 +37,7 @@ class GeneratedConfig:
# Group `Optimization`
Optimization_ScreenshotInterval = 0.3
Optimization_CombatScreenshotInterval = 1.0
Optimization_WhenTaskQueueEmpty = 'goto_main' # stay_there, goto_main, close_game, exit_aas, exit_emulator, exit_aas_emulator, shutdown
Optimization_WhenTaskQueueEmpty = 'goto_main' # stay_there, goto_main, close_game, exit_aas, exit_aas_emulator, shutdown
# Group `Cafe`
Cafe_Reward = True

View File

@ -221,12 +221,11 @@
},
"WhenTaskQueueEmpty": {
"name": "When Task Queue is Empty",
"help": "Close Blue Archive when there are no pending tasks, can help reduce CPU.\nExit AAS, emulator and shutdown should be set while AAS is running tasks otherwise it won't start and after their execution it will be reset to Goto Main Page.\nExit AAS and emulator are only available on Windows.\nExit emulator is only possible if instance name and emulator path follow the same auto-filled values according to 'Serial' in Emulator Settings",
"help": "Close AL when there are no pending tasks, can help reduce CPU",
"stay_there": "Stay There",
"goto_main": "Goto Main Page",
"close_game": "Close Game",
"exit_aas": "Exit AAS",
"exit_emulator": "Exit Emulator",
"exit_aas_emulator": "Exit AAS & Emulator",
"shutdown": "Shutdown"
}

View File

@ -226,7 +226,6 @@
"goto_main": "前往主界面",
"close_game": "关闭游戏",
"exit_aas": "exit_aas",
"exit_emulator": "exit_emulator",
"exit_aas_emulator": "exit_aas_emulator",
"shutdown": "shutdown"
}