1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 08:59:25 +08:00

fix: copy full original method from ConfigUpdater.config_update

This commit is contained in:
0O0o0oOoO00
2026-01-23 11:01:23 +08:00
parent 4c8e5ed105
commit e67a49ec29

View File

@@ -869,6 +869,21 @@ class ConfigUpdater(ConfigUpdater):
keys=f'{task}.Campaign.Event',
value=deep_get(self.args, f'{task}.Campaign.Event.option_{server}')[0])
# Events does not allow default stage 12-4
def default_stage(t, stage):
if deep_get(new, keys=f'{t}.Campaign.Name', default='12-4') in ['7-2', '12-4']:
deep_set(new, keys=f'{t}.Campaign.Name', value=stage)
for task in EVENTS + WAR_ARCHIVES:
default_stage(task, 'D3')
for task in COALITIONS:
default_stage(task, 'area1-normal')
if not is_template:
new = self.config_redirect(old, new)
new = self._override(new)
return new
FULL_CONFIG_IMPORT = '''
# This file was automatically generated by module/config/config_updater.py.