From b3c9c5dd78a51db36f7f670e624ea25211e8bf84 Mon Sep 17 00:00:00 2001 From: sui-feng-cb <2518179942@qq.com> Date: Thu, 23 Apr 2026 16:49:22 +0800 Subject: [PATCH] Upd: config updater --- campaign/Readme.md | 2 +- module/config/config_updater.py | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/campaign/Readme.md b/campaign/Readme.md index e24b5daad..8c0b4af22 100644 --- a/campaign/Readme.md +++ b/campaign/Readme.md @@ -255,7 +255,7 @@ To add a new event, add a new row in here, and run `python -m module.config.conf | 20250703 | event 20250424 cn | Toward Tulipa’s Seas | - | - | - | 揚起鬱金之旗 | | 20250724 | event 20241219 cn | Substellar Crepuscule | - | - | - | 星光下的餘暉 | | 20250724 | event 20250724 cn | The Alchemist and the Tower of Horizons | 优米雅的炼金工房 | The Alchemist and the Tower of Horizons | 錬金術士と天空邂逅の塔 | - | -| 20250726 | event 20221124 cn | The Alchemist and the Archipelago of Secrets | 复刻炼金术士与秘密遗迹群岛 | The Alchemist and the Archipelago of Secrets Rerun | 錬金術士と謎の遺跡群島(復刻) | - | +| 20250724 | event 20221124 cn | The Alchemist and the Archipelago of Secrets | 复刻炼金术士与秘密遗迹群岛 | The Alchemist and the Archipelago of Secrets Rerun | 錬金術士と謎の遺跡群島(復刻) | - | | 20250807 | event 20250724 cn | The Alchemist and the Tower of Horizons | - | - | - | 鍊金術士與天際交會之塔 | | 20250807 | event 20221124 cn | The Alchemist and the Archipelago of Secrets | - | - | - | 復刻鍊金術士與秘密遺跡群島 | | 20250814 | event 20250814 cn | Secrets of the Abyss | 奇渊下的秘密 | Secrets of the Abyss | 淵層界の秘密 | - | diff --git a/module/config/config_updater.py b/module/config/config_updater.py index bdb3c8a67..2eec48ae3 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -439,15 +439,6 @@ class ConfigGenerator: v args.json -----+-----> args.json """ - def is_concurrent_event(date1, date2): - if isinstance(date1, int): - date1 = str(date1) - if isinstance(date2, int): - date2 = str(date2) - year1, week1, _ = datetime.strptime(date1, '%Y%m%d').isocalendar() - year2, week2, _ = datetime.strptime(date2, '%Y%m%d').isocalendar() - return year1 == year2 and week1 == week2 - for server in ARCHIVES_PREFIX.keys(): for event in self.event: name = event.__getattribute__(server) @@ -462,7 +453,7 @@ class ConfigGenerator: if event.is_raid: if not hasattr(self, f'_{server}_latest_raid_date'): setattr(self, f'_{server}_latest_raid_date', int(event.date)) - if is_concurrent_event(int(event.date), getattr(self, f'_{server}_latest_raid_date')): + if int(event.date) == getattr(self, f'_{server}_latest_raid_date'): for task in RAIDS: insert(task) elif event.is_war_archives: @@ -471,13 +462,13 @@ class ConfigGenerator: elif event.is_coalition: if not hasattr(self, f'_{server}_latest_coalition_date'): setattr(self, f'_{server}_latest_coalition_date', int(event.date)) - if is_concurrent_event(int(event.date), getattr(self, f'_{server}_latest_coalition_date')): + if int(event.date) == getattr(self, f'_{server}_latest_coalition_date'): for task in COALITIONS: insert(task) else: if not hasattr(self, f'_{server}_latest_event_date'): setattr(self, f'_{server}_latest_event_date', int(event.date)) - if is_concurrent_event(int(event.date), getattr(self, f'_{server}_latest_event_date')): + if int(event.date) == getattr(self, f'_{server}_latest_event_date'): for task in EVENTS + GEMS_FARMINGS: insert(task)