mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-22 04:49:17 +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 to run and bind.
|
||||||
# Task means the name of the function to run in AzurLaneAutoScript class.
|
# Task means the name of the function to run in AzurLaneAutoScript class.
|
||||||
if config_name == 'template':
|
if config_name == 'template':
|
||||||
|
# For dev tools
|
||||||
logger.info('Using template config, which is read only')
|
logger.info('Using template config, which is read only')
|
||||||
self.auto_update = False
|
self.auto_update = False
|
||||||
self.load()
|
self.task = 'template'
|
||||||
if task is None:
|
else:
|
||||||
task = self.get_next()
|
self.load()
|
||||||
self.bind(task)
|
if task is None:
|
||||||
logger.info(f'Bind task {task}')
|
task = self.get_next()
|
||||||
self.task = task
|
self.bind(task)
|
||||||
|
logger.info(f'Bind task {task}')
|
||||||
|
self.task = task
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
self.data = self.read_file(self.config_name)
|
self.data = self.read_file(self.config_name)
|
||||||
@@ -486,9 +489,3 @@ class MultiSetWrapper:
|
|||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
self.main.update()
|
self.main.update()
|
||||||
self.main.auto_update = True
|
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