1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-22 07:03:43 +08:00

Fix: Skip first screenshot in tools

since you cannot run benchmark before benckmarked
This commit is contained in:
LmeSzinc
2024-06-21 00:34:11 +08:00
parent 38b549a9e5
commit dc1aa58a1b
2 changed files with 4 additions and 3 deletions

View File

@@ -62,9 +62,10 @@ class AzurLaneAutoScript:
logger.exception(e) logger.exception(e)
exit(1) exit(1)
def run(self, command): def run(self, command, skip_first_screenshot=False):
try: try:
self.device.screenshot() if not skip_first_screenshot:
self.device.screenshot()
self.__getattribute__(command)() self.__getattribute__(command)()
return True return True
except TaskEnd: except TaskEnd:

View File

@@ -153,7 +153,7 @@ class ProcessManager:
elif func in get_available_func(): elif func in get_available_func():
from alas import AzurLaneAutoScript from alas import AzurLaneAutoScript
AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func)) AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func), skip_first_screenshot=True)
elif func in get_available_mod(): elif func in get_available_mod():
mod = load_mod(func) mod = load_mod(func)