mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Fix: Re-implemented per PR comments
This commit is contained in:
@@ -79,9 +79,7 @@ def main(ini_name=''):
|
||||
event_latest = dic_ini_to_gui.get(event_latest, event_latest)
|
||||
# Archives list
|
||||
archives_folder = [f for f in dic_event[server.server].values() if f.startswith('war_archives_')]
|
||||
archives_latest = sorted([f for f in archives_folder], reverse=True)[0]
|
||||
archives_folder = [dic_ini_to_gui.get(f, f) for f in archives_folder][::-1]
|
||||
archives_latest = dic_ini_to_gui.get(archives_latest, archives_latest)
|
||||
# Raid list
|
||||
raid_folder = [f for f in dic_event[server.server].values() if f.startswith('raid_')]
|
||||
raid_latest = sorted([f for f in raid_folder], reverse=True)[0]
|
||||
@@ -436,7 +434,7 @@ def main(ini_name=''):
|
||||
war_archives = war_archives_parser.add_argument_group(
|
||||
'war archives settings', 'Type a stage and select a corresponding event for that stage', gooey_options={'label_color': '#931D03'})
|
||||
war_archives.add_argument('--war_archives_stage', default=default('--war_archives_stage'), help='Type stage name, not case sensitive, E.g D3, SP3, HT6', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=archives_latest, choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=default('--war_archives_name'), choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
|
||||
# ==========共斗活动==========
|
||||
raid_parser = subs.add_parser('共斗活动')
|
||||
|
||||
@@ -80,9 +80,7 @@ def main(ini_name=''):
|
||||
event_latest = dic_ini_to_gui.get(event_latest, event_latest)
|
||||
# Archives list
|
||||
archives_folder = [f for f in dic_event[server.server].values() if f.startswith('war_archives_')]
|
||||
archives_latest = sorted([f for f in archives_folder], reverse=True)[0]
|
||||
archives_folder = [dic_ini_to_gui.get(f, f) for f in archives_folder][::-1]
|
||||
archives_latest = dic_ini_to_gui.get(archives_latest, archives_latest)
|
||||
# Raid list
|
||||
raid_folder = [f for f in dic_event[server.server].values() if f.startswith('raid_')]
|
||||
raid_latest = sorted([f for f in raid_folder], reverse=True)[0]
|
||||
@@ -488,7 +486,7 @@ def main(ini_name=''):
|
||||
war_archives = war_archives_parser.add_argument_group(
|
||||
'war archives settings', 'Type a stage and select a corresponding event for that stage', gooey_options={'label_color': '#931D03'})
|
||||
war_archives.add_argument('--war_archives_stage', default=default('--war_archives_stage'), help='Type stage name, not case sensitive, E.g D3, SP3, HT6', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=archives_latest, choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=default('--war_archives_name'), choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
|
||||
# ==========Raid==========
|
||||
raid_parser = subs.add_parser('raid')
|
||||
|
||||
@@ -80,9 +80,7 @@ def main(ini_name=''):
|
||||
event_latest = dic_ini_to_gui.get(event_latest, event_latest)
|
||||
# Archives list
|
||||
archives_folder = [f for f in dic_event[server.server].values() if f.startswith('war_archives_')]
|
||||
archives_latest = sorted([f for f in archives_folder], reverse=True)[0]
|
||||
archives_folder = [dic_ini_to_gui.get(f, f) for f in archives_folder][::-1]
|
||||
archives_latest = dic_ini_to_gui.get(archives_latest, archives_latest)
|
||||
# Raid list
|
||||
raid_folder = [f for f in dic_event[server.server].values() if f.startswith('raid_')]
|
||||
raid_latest = sorted([f for f in raid_folder], reverse=True)[0]
|
||||
@@ -488,7 +486,7 @@ def main(ini_name=''):
|
||||
war_archives = war_archives_parser.add_argument_group(
|
||||
'war archives settings', 'Type a stage and select a corresponding event for that stage', gooey_options={'label_color': '#931D03'})
|
||||
war_archives.add_argument('--war_archives_stage', default=default('--war_archives_stage'), help='Type stage name, not case sensitive, E.g D3, SP3, HT6', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=archives_latest, choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=default('--war_archives_name'), choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
|
||||
# ==========Raid==========
|
||||
raid_parser = subs.add_parser('raid')
|
||||
|
||||
@@ -79,9 +79,7 @@ def main(ini_name=''):
|
||||
event_latest = dic_ini_to_gui.get(event_latest, event_latest)
|
||||
# Archives list
|
||||
archives_folder = [f for f in dic_event[server.server].values() if f.startswith('war_archives_')]
|
||||
archives_latest = sorted([f for f in archives_folder], reverse=True)[0]
|
||||
archives_folder = [dic_ini_to_gui.get(f, f) for f in archives_folder][::-1]
|
||||
archives_latest = dic_ini_to_gui.get(archives_latest, archives_latest)
|
||||
# Raid list
|
||||
raid_folder = [f for f in dic_event[server.server].values() if f.startswith('raid_')]
|
||||
raid_latest = sorted([f for f in raid_folder], reverse=True)[0]
|
||||
@@ -437,7 +435,7 @@ def main(ini_name=''):
|
||||
war_archives = war_archives_parser.add_argument_group(
|
||||
'war archives settings', 'Type a stage and select a corresponding event for that stage', gooey_options={'label_color': '#931D03'})
|
||||
war_archives.add_argument('--war_archives_stage', default=default('--war_archives_stage'), help='Type stage name, not case sensitive, E.g D3, SP3, HT6', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=archives_latest, choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
war_archives.add_argument('--war_archives_name', default=default('--war_archives_name'), choices=archives_folder, help='There a dropdown menu with many options', gooey_options={'label_color': '#4B5F83'})
|
||||
|
||||
# ==========共鬥活動==========
|
||||
raid_parser = subs.add_parser('共鬥活動')
|
||||
|
||||
@@ -451,6 +451,7 @@ class AzurLaneConfig:
|
||||
"""
|
||||
module.war_archives
|
||||
"""
|
||||
USE_DATA_KEY = False
|
||||
WAR_ARCHIVES_NAME = ''
|
||||
WAR_ARCHIVES_STAGE = ''
|
||||
|
||||
|
||||
@@ -887,20 +887,6 @@ dic_event = {
|
||||
},
|
||||
}
|
||||
|
||||
from module.war_archives.assets import \
|
||||
TEMPLATE_VISITORS_DYED_IN_RED, TEMPLATE_FALLEN_WINGS, TEMPLATE_WINTERS_CROWN, TEMPLATE_DIVERGENT_CHESSBOARD, \
|
||||
TEMPLATE_STRIVE_WISH_AND_STRATEGIZE, TEMPLATE_ENCIRCLING_GRAF_SPEE, TEMPLATE_GLORIOUS_BATTLE
|
||||
dic_archives_template = {
|
||||
'war_archives_20190321_en': TEMPLATE_VISITORS_DYED_IN_RED,
|
||||
'war_archives_20181026_en': TEMPLATE_FALLEN_WINGS,
|
||||
'war_archives_20190221_en': TEMPLATE_WINTERS_CROWN,
|
||||
'war_archives_20191031_en': TEMPLATE_DIVERGENT_CHESSBOARD,
|
||||
'war_archives_20181020_en': TEMPLATE_STRIVE_WISH_AND_STRATEGIZE,
|
||||
'war_archives_20191010_en': TEMPLATE_ENCIRCLING_GRAF_SPEE,
|
||||
'war_archives_20190620_en': TEMPLATE_GLORIOUS_BATTLE
|
||||
}
|
||||
|
||||
|
||||
def to_bool(string):
|
||||
return dic_bool.get(string, string)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user