Fix: Normal event contains 'SP' map

- [CN] Add event entrance 永夜幻光
This commit is contained in:
LmeSzinc 2020-07-24 11:36:13 +08:00
parent 30cafe1b0e
commit 5f6567fe17
3 changed files with 8 additions and 6 deletions

View File

@ -606,7 +606,8 @@ class AzurLaneConfig:
# Event
option = config['Event']
self.EVENT_NAME = option['event_name']
if 'sp' in ''.join(os.listdir(f'./campaign/{self.EVENT_NAME}')):
name = ''.join(os.listdir(f'./campaign/{self.EVENT_NAME}'))
if 'sp1' in name or 'sp2' in name or 'sp3' in name:
self.CAMPAIGN_EVENT = option['sp_stage']
else:
self.CAMPAIGN_EVENT = option['event_stage']

View File

@ -483,6 +483,7 @@ dic_chi_to_eng = {
'穹顶下的圣咏曲': 'event_20200521_cn',
'峡湾间的反击': 'event_20200603_cn',
'复刻特别演习埃塞克斯级': 'raid_20200624',
'永夜幻光': 'event_20200723_cn',
}
dic_eng_to_chi = {v: k for k, v in dic_chi_to_eng.items()}

View File

@ -37,11 +37,11 @@ class CampaignAB(CampaignRun):
chapter = self.config.EVENT_AB_CHAPTER.split('_')[1]
self.reward_backup_daily_reward_settings()
for name in existing:
if name.lower().startswith('sp'):
logger.warning(f'{self.config.EVENT_NAME_AB} seems to be a SP event, skip daily_ab')
logger.warning(f'Existing map files: {existing}')
return False
name = ''.join(existing).lower()
if 'sp1' in name or 'sp2' in name or 'sp3' in name:
logger.warning(f'{self.config.EVENT_NAME_AB} seems to be a SP event, skip daily_ab')
logger.warning(f'Existing map files: {existing}')
return False
for name in CAMPAIGN_NAME:
if name not in existing: