mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Refactor: Rename main configs
- Faster chapter selection and page_campaign - Rename some old Chinglish variables in map info
This commit is contained in:
@@ -3,7 +3,7 @@ from module.campaign.campaign_ocr import CampaignOcr
|
||||
from module.exception import CampaignNameError, ScriptEnd
|
||||
from module.logger import logger
|
||||
from module.ui.switch import Switch
|
||||
from module.ui.ui import UI
|
||||
from module.ui.ui import UI, page_campaign, page_event, page_sp
|
||||
|
||||
STAGE_SHOWN_WAIT = (1, 1.2)
|
||||
MODE_SWITCH_1 = Switch('Mode_switch_1', offset=(30, 10))
|
||||
@@ -85,7 +85,7 @@ class CampaignUI(UI, CampaignOcr):
|
||||
chapter, _ = self._campaign_separate_name(name)
|
||||
|
||||
if chapter.isdigit():
|
||||
self.ui_weigh_anchor()
|
||||
self.ui_goto(page_campaign)
|
||||
self.campaign_ensure_mode('normal')
|
||||
self.campaign_ensure_chapter(index=chapter)
|
||||
if mode == 'hard':
|
||||
@@ -93,7 +93,7 @@ class CampaignUI(UI, CampaignOcr):
|
||||
self.campaign_ensure_chapter(index=chapter)
|
||||
|
||||
elif chapter in ['a', 'b', 'c', 'd', 'ex_sp', 'as', 'bs', 'cs', 'ds']:
|
||||
self.ui_goto_event()
|
||||
self.ui_goto(page_event)
|
||||
if chapter in ['a', 'b', 'as', 'bs']:
|
||||
self.campaign_ensure_mode('normal')
|
||||
elif chapter in ['c', 'd', 'cs', 'ds']:
|
||||
@@ -103,7 +103,7 @@ class CampaignUI(UI, CampaignOcr):
|
||||
self.campaign_ensure_chapter(index=chapter)
|
||||
|
||||
elif chapter == 'sp':
|
||||
self.ui_goto_sp()
|
||||
self.ui_goto(page_sp)
|
||||
self.campaign_ensure_chapter(index=chapter)
|
||||
|
||||
else:
|
||||
@@ -122,3 +122,10 @@ class CampaignUI(UI, CampaignOcr):
|
||||
|
||||
logger.warning('Campaign name error')
|
||||
raise ScriptEnd('Campaign name error')
|
||||
|
||||
def commission_notice_show_at_campaign(self):
|
||||
"""
|
||||
Returns:
|
||||
bool: If any commission finished.
|
||||
"""
|
||||
return self.appear(page_campaign.check_button, offset=(20, 20)) and self.appear(COMMISSION_NOTICE_AT_CAMPAIGN)
|
||||
|
||||
Reference in New Issue
Block a user