mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 04:31:30 +08:00
Add: Handle story stages after A2
This commit is contained in:
@@ -212,6 +212,21 @@ class CampaignUI(MapOperation, CampaignEvent, CampaignOcr):
|
||||
else:
|
||||
logger.warning(f'Unknown campaign chapter: {name}')
|
||||
|
||||
def handle_campaign_ui_additional(self):
|
||||
"""
|
||||
Returns:
|
||||
bool: If handled
|
||||
"""
|
||||
if self.appear(WITHDRAW, offset=(30, 30)):
|
||||
# logger.info("WITHDRAW button found, wait until map loaded to prevent bugs in game client")
|
||||
self.ensure_no_info_bar(timeout=2)
|
||||
try:
|
||||
self.withdraw()
|
||||
except CampaignEnd:
|
||||
pass
|
||||
return True
|
||||
return False
|
||||
|
||||
def ensure_campaign_ui(self, name, mode='normal'):
|
||||
for n in range(20):
|
||||
try:
|
||||
@@ -220,13 +235,7 @@ class CampaignUI(MapOperation, CampaignEvent, CampaignOcr):
|
||||
return True
|
||||
except CampaignNameError:
|
||||
pass
|
||||
if self.appear(WITHDRAW, offset=(30, 30)):
|
||||
# logger.info("WITHDRAW button found, wait until map loaded to prevent bugs in game client")
|
||||
self.ensure_no_info_bar(timeout=2)
|
||||
try:
|
||||
self.withdraw()
|
||||
except CampaignEnd:
|
||||
pass
|
||||
if self.handle_campaign_ui_additional():
|
||||
continue
|
||||
|
||||
self.device.screenshot()
|
||||
|
||||
Reference in New Issue
Block a user