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:
5
alas.py
5
alas.py
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user