mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 22:08:20 +08:00
Fix: Minor config changes for dev tools
This commit is contained in:
@@ -67,14 +67,17 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig):
|
||||
# Task to run and bind.
|
||||
# Task means the name of the function to run in AzurLaneAutoScript class.
|
||||
if config_name == 'template':
|
||||
# For dev tools
|
||||
logger.info('Using template config, which is read only')
|
||||
self.auto_update = False
|
||||
self.load()
|
||||
if task is None:
|
||||
task = self.get_next()
|
||||
self.bind(task)
|
||||
logger.info(f'Bind task {task}')
|
||||
self.task = task
|
||||
self.task = 'template'
|
||||
else:
|
||||
self.load()
|
||||
if task is None:
|
||||
task = self.get_next()
|
||||
self.bind(task)
|
||||
logger.info(f'Bind task {task}')
|
||||
self.task = task
|
||||
|
||||
def load(self):
|
||||
self.data = self.read_file(self.config_name)
|
||||
@@ -486,9 +489,3 @@ class MultiSetWrapper:
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
self.main.update()
|
||||
self.main.auto_update = True
|
||||
|
||||
cfg = AzurLaneConfig('alas')
|
||||
cfg.get_next_task()
|
||||
print(cfg.pending_task)
|
||||
print(cfg.waiting_task)
|
||||
print(cfg.task)
|
||||
Reference in New Issue
Block a user