mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 00:28:20 +08:00
Opt: Auto convert chapter A/B/C/D to T/HT
This commit is contained in:
@@ -26,3 +26,29 @@ class EventBase(CampaignRun):
|
||||
self.campaign.config.temporary(
|
||||
MAP_IS_ONE_TIME_STAGE=False
|
||||
)
|
||||
|
||||
def convert_stages(self, stages):
|
||||
"""
|
||||
Convert whatever input to the correct stage name
|
||||
"""
|
||||
|
||||
def convert(n):
|
||||
return self.handle_stage_name(n, folder=self.config.Campaign_Event)[0]
|
||||
|
||||
if isinstance(stages, str):
|
||||
return convert(stages)
|
||||
if isinstance(stages, list):
|
||||
out = []
|
||||
for name in stages:
|
||||
if isinstance(name, EventStage):
|
||||
name.stage = convert(name.stage)
|
||||
out.append(name)
|
||||
elif isinstance(name, str):
|
||||
out.append(convert(name))
|
||||
else:
|
||||
out.append(name)
|
||||
return out
|
||||
if isinstance(stages, Filter):
|
||||
stages.filter = [[convert(selection[0])] for selection in stages.filter]
|
||||
return stages
|
||||
return stages
|
||||
|
||||
Reference in New Issue
Block a user