mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 17:13:34 +08:00
Fix: Modified settings are still retained and written to file in the next update (#737)
This commit is contained in:
@@ -61,7 +61,7 @@ class CampaignRun(UI):
|
|||||||
'please check for update, or make map files yourself using dev_tools/map_extractor.py')
|
'please check for update, or make map files yourself using dev_tools/map_extractor.py')
|
||||||
raise RequestHumanTakeover
|
raise RequestHumanTakeover
|
||||||
|
|
||||||
config = copy.copy(self.config).merge(self.module.Config())
|
config = copy.deepcopy(self.config).merge(self.module.Config())
|
||||||
device = self.device
|
device = self.device
|
||||||
self.campaign = self.module.Campaign(config=config, device=device)
|
self.campaign = self.module.Campaign(config=config, device=device)
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig):
|
|||||||
|
|
||||||
# Bind arguments
|
# Bind arguments
|
||||||
visited = set()
|
visited = set()
|
||||||
self.bound = {}
|
self.bound.clear()
|
||||||
for func in func_set:
|
for func in func_set:
|
||||||
func_data = self.data.get(func, {})
|
func_data = self.data.get(func, {})
|
||||||
for group, group_data in func_data.items():
|
for group, group_data in func_data.items():
|
||||||
@@ -193,7 +193,8 @@ class AzurLaneConfig(ConfigUpdater, ManualConfig, GeneratedConfig):
|
|||||||
deep_set(self.data, keys=path, value=value)
|
deep_set(self.data, keys=path, value=value)
|
||||||
|
|
||||||
logger.info(f'Save config {filepath_config(self.config_name)}, {dict_to_kv(self.modified)}')
|
logger.info(f'Save config {filepath_config(self.config_name)}, {dict_to_kv(self.modified)}')
|
||||||
self.modified = {}
|
# Don't use self.modified = {}, that will create a new object.
|
||||||
|
self.modified.clear()
|
||||||
write_file(filepath_config(self.config_name), data=self.data)
|
write_file(filepath_config(self.config_name), data=self.data)
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user