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

Opt: ModuleBase receive ini name for easier debug

This commit is contained in:
LmeSzinc
2021-01-09 18:14:55 +08:00
parent bc0f56f3a6
commit 4d25a316b8

View File

@@ -9,15 +9,19 @@ class ModuleBase:
def __init__(self, config, device=None):
"""
Args:
config (AzurLaneConfig):
config (AzurLaneConfig, str):
device (Device):
"""
self.config = config
self.interval_timer = {}
if isinstance(config, str):
self.config = AzurLaneConfig(config)
else:
self.config = config
if device is not None:
self.device = device
else:
self.device = Device(config=config)
self.device = Device(config=self.config)
self.interval_timer = {}
def appear(self, button, offset=0, interval=0, threshold=None):
"""