mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-19 11:58:08 +08:00
Opt: ModuleBase receive ini name for easier debug
This commit is contained in:
@@ -9,15 +9,19 @@ class ModuleBase:
|
|||||||
def __init__(self, config, device=None):
|
def __init__(self, config, device=None):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
config (AzurLaneConfig):
|
config (AzurLaneConfig, str):
|
||||||
device (Device):
|
device (Device):
|
||||||
"""
|
"""
|
||||||
self.config = config
|
if isinstance(config, str):
|
||||||
self.interval_timer = {}
|
self.config = AzurLaneConfig(config)
|
||||||
|
else:
|
||||||
|
self.config = config
|
||||||
if device is not None:
|
if device is not None:
|
||||||
self.device = device
|
self.device = device
|
||||||
else:
|
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):
|
def appear(self, button, offset=0, interval=0, threshold=None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user