diff --git a/module/campaign/campaign_event.py b/module/campaign/campaign_event.py index 6929b9bee..76f46715c 100644 --- a/module/campaign/campaign_event.py +++ b/module/campaign/campaign_event.py @@ -7,6 +7,7 @@ from module.config.utils import DEFAULT_TIME from module.logger import logger from module.ui.assets import CAMPAIGN_MENU_NO_EVENT from module.ui.page import page_event, page_campaign_menu, page_sp, page_coalition +from module.war_archives.assets import WAR_ARCHIVES_CAMPAIGN_CHECK class CampaignEvent(CampaignStatus): @@ -137,26 +138,32 @@ class CampaignEvent(CampaignStatus): def ui_goto_event(self): # Already in page_event, skip event_check. if self.ui_get_current_page() == page_event: - logger.info('Already at page_event') - return True - else: - self.ui_goto(page_campaign_menu) - # Check event availability - if self.is_event_entrance_available(): - self.ui_goto(page_event) + if self.appear(WAR_ARCHIVES_CAMPAIGN_CHECK, offset=(20, 20)): + logger.info('At war archives') + self.ui_goto_main() + else: + logger.info('Already at page_event') return True + self.ui_goto(page_campaign_menu) + # Check event availability + if self.is_event_entrance_available(): + self.ui_goto(page_event) + return True def ui_goto_sp(self): # Already in page_event, skip event_check. if self.ui_get_current_page() == page_sp: - logger.info('Already at page_sp') - return True - else: - self.ui_goto(page_campaign_menu) - # Check event availability - if self.is_event_entrance_available(): - self.ui_goto(page_sp) + if self.appear(WAR_ARCHIVES_CAMPAIGN_CHECK, offset=(20, 20)): + logger.info('At war archives') + self.ui_goto_main() + else: + logger.info('Already at page_sp') return True + self.ui_goto(page_campaign_menu) + # Check event availability + if self.is_event_entrance_available(): + self.ui_goto(page_sp) + return True def ui_goto_coalition(self): # Already in page_event, skip event_check. diff --git a/module/war_archives/war_archives.py b/module/war_archives/war_archives.py index 40e2c9a46..d4943c1db 100644 --- a/module/war_archives/war_archives.py +++ b/module/war_archives/war_archives.py @@ -31,7 +31,5 @@ class CampaignWarArchives(CampaignRun, CampaignBase): return False def run(self, name=None, folder='campaign_main', mode='normal', total=0): - backup = self.config.temporary(USE_DATA_KEY=True) + self.config.override(USE_DATA_KEY=True) super().run(name, folder, mode, total) - backup.recover() - self.ui_goto_main() # Go to main, as remaining in page can throw off Event task