1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +08:00

Add: Capability for Config decorator to replace func pointer based on options

Add: [EN] HP check within OS map after zone clear for os_world_clear module
Retreat for repair if any one ship below configured threshold
This commit is contained in:
nEEtdo0d
2021-05-14 21:15:57 -04:00
parent 43ee1f35fe
commit 4d1f31f4ba
7 changed files with 57 additions and 26 deletions

View File

@@ -43,7 +43,13 @@ class Config:
if name not in cls.func_list:
cls.func_list[name] = [data]
else:
cls.func_list[name].append(data)
override = False
for record in cls.func_list[name]:
if record['options'] == data['options']:
record['func'] = data['func']
override = True
if not override:
cls.func_list[name].append(data)
@wraps(func)
def wrapper(self, *args, **kwargs):