1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-15 04:07:20 +08:00

Opt: Re-organise CalculateEmotion and IgnoreLowEmotionWarn

This commit is contained in:
LmeSzinc
2023-02-18 01:19:04 +08:00
parent b63cf43568
commit d191d16649
18 changed files with 211 additions and 178 deletions

View File

@@ -24,7 +24,7 @@ class GemsCampaignOverride(CampaignBase):
If GEMS_LOW_EMOTION_WITHDRAW is True, withdraw combat and change flag ship
"""
if self.config.GemsFarming_LowEmotionRetreat:
if not self.config.Emotion_IgnoreLowEmotionWarn:
if not self.emotion.is_ignore:
return False
if self.handle_popup_cancel('IGNORE_LOW_EMOTION'):
self.config.GEMS_EMOTION_TRIGGRED = True

View File

@@ -108,7 +108,7 @@ class CampaignRun(CampaignEvent):
Returns:
bool: If triggered a restart condition.
"""
if not self.campaign.config.Emotion_IgnoreLowEmotionWarn:
if not self.campaign.emotion.is_ignore:
if self.campaign.emotion.triggered_bug():
logger.info('Triggered restart avoid emotion bug')
return True