1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 13:29:25 +08:00

add: load cracker without pause

This commit is contained in:
0O0o0oOoO00
2025-11-21 18:02:29 +08:00
parent b4d1950299
commit e3fdc85c27
13 changed files with 58 additions and 1 deletions

View File

@@ -367,3 +367,9 @@ class CrackApi:
def disable_skip_story(self):
self.post("disable_skip_story")
def init(self):
self.post("init")
def init_without_pause(self):
self.post("init_without_pause")

View File

@@ -81,6 +81,9 @@ def do_crack_op_on_func(
return wrapper
g_cracker_has_inited = False
def do_crack_op(config: AzurLaneConfig, device: Device, ops: Union[Type[CrackOp.Op], List[Type[CrackOp.Op]]]):
if not config.full_config.Hook_HookGeneral_Enable:
return
@@ -100,6 +103,16 @@ def do_crack_op(config: AzurLaneConfig, device: Device, ops: Union[Type[CrackOp.
base_url = f"http://127.0.0.1:{device.adb.forward_port(REMOTE_PORT)}"
timeout = full_config.Hook_HookGeneral_RequestTimeLimit
api = CrackApi(base_url, timeout=timeout)
global g_cracker_has_inited
if not g_cracker_has_inited:
without_pause = full_config.Hook_HookGeneral_InitWithoutPause
if without_pause:
api.init_without_pause()
else:
api.init()
g_cracker_has_inited = True
for op in l:
if op == CrackOp.DisableAll:
api.disable_all()