mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-14 20:06:02 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -104,6 +104,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
logger.info("Using template config, which is read only")
|
||||
self.auto_update = False
|
||||
self.task = name_to_function("template")
|
||||
<<<<<<< HEAD
|
||||
else:
|
||||
self.load()
|
||||
if task is None:
|
||||
@@ -115,6 +116,24 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig, ConfigWatcher
|
||||
self.bind(task)
|
||||
self.task = task
|
||||
self.save()
|
||||
=======
|
||||
self.init_task(task)
|
||||
|
||||
def init_task(self, task=None):
|
||||
if self.is_template_config:
|
||||
return
|
||||
|
||||
self.load()
|
||||
if task is None:
|
||||
# Bind `Alas` by default which includes emulator settings.
|
||||
task = name_to_function("Alas")
|
||||
else:
|
||||
# Bind a specific task for debug purpose.
|
||||
task = name_to_function(task)
|
||||
self.bind(task)
|
||||
self.task = task
|
||||
self.save()
|
||||
>>>>>>> 24aa3e00bd9af9a6a050df54c6a0cef959a9c6c0
|
||||
|
||||
def load(self):
|
||||
self.data = self.read_file(self.config_name)
|
||||
|
||||
Reference in New Issue
Block a user