mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-24 13:20:00 +08:00
Upd: config updater
This commit is contained in:
@@ -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 | - | - | - | 揚起鬱金之旗 |
|
| 20250703 | event 20250424 cn | Toward Tulipa’s Seas | - | - | - | 揚起鬱金之旗 |
|
||||||
| 20250724 | event 20241219 cn | Substellar Crepuscule | - | - | - | 星光下的餘暉 |
|
| 20250724 | event 20241219 cn | Substellar Crepuscule | - | - | - | 星光下的餘暉 |
|
||||||
| 20250724 | event 20250724 cn | The Alchemist and the Tower of Horizons | 优米雅的炼金工房 | The Alchemist and the Tower of Horizons | 錬金術士と天空邂逅の塔 | - |
|
| 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 20250724 cn | The Alchemist and the Tower of Horizons | - | - | - | 鍊金術士與天際交會之塔 |
|
||||||
| 20250807 | event 20221124 cn | The Alchemist and the Archipelago of Secrets | - | - | - | 復刻鍊金術士與秘密遺跡群島 |
|
| 20250807 | event 20221124 cn | The Alchemist and the Archipelago of Secrets | - | - | - | 復刻鍊金術士與秘密遺跡群島 |
|
||||||
| 20250814 | event 20250814 cn | Secrets of the Abyss | 奇渊下的秘密 | Secrets of the Abyss | 淵層界の秘密 | - |
|
| 20250814 | event 20250814 cn | Secrets of the Abyss | 奇渊下的秘密 | Secrets of the Abyss | 淵層界の秘密 | - |
|
||||||
|
|||||||
@@ -439,15 +439,6 @@ class ConfigGenerator:
|
|||||||
v
|
v
|
||||||
args.json -----+-----> args.json
|
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 server in ARCHIVES_PREFIX.keys():
|
||||||
for event in self.event:
|
for event in self.event:
|
||||||
name = event.__getattribute__(server)
|
name = event.__getattribute__(server)
|
||||||
@@ -462,7 +453,7 @@ class ConfigGenerator:
|
|||||||
if event.is_raid:
|
if event.is_raid:
|
||||||
if not hasattr(self, f'_{server}_latest_raid_date'):
|
if not hasattr(self, f'_{server}_latest_raid_date'):
|
||||||
setattr(self, f'_{server}_latest_raid_date', int(event.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:
|
for task in RAIDS:
|
||||||
insert(task)
|
insert(task)
|
||||||
elif event.is_war_archives:
|
elif event.is_war_archives:
|
||||||
@@ -471,13 +462,13 @@ class ConfigGenerator:
|
|||||||
elif event.is_coalition:
|
elif event.is_coalition:
|
||||||
if not hasattr(self, f'_{server}_latest_coalition_date'):
|
if not hasattr(self, f'_{server}_latest_coalition_date'):
|
||||||
setattr(self, f'_{server}_latest_coalition_date', int(event.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:
|
for task in COALITIONS:
|
||||||
insert(task)
|
insert(task)
|
||||||
else:
|
else:
|
||||||
if not hasattr(self, f'_{server}_latest_event_date'):
|
if not hasattr(self, f'_{server}_latest_event_date'):
|
||||||
setattr(self, f'_{server}_latest_event_date', int(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:
|
for task in EVENTS + GEMS_FARMINGS:
|
||||||
insert(task)
|
insert(task)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user