mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Fix: fleet_switch_click() may fail when SWITCH_OVER not appeared
If SWITCH_OVER not appeared (in most cases, connection unstable), we should wait for it instead of skipping the switch click.
This commit is contained in:
@@ -24,9 +24,7 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand
|
||||
Switch fleet.
|
||||
"""
|
||||
logger.info('Switch over')
|
||||
if not self.appear(SWITCH_OVER):
|
||||
logger.warning('No buttons detected.')
|
||||
return False
|
||||
self.wait_until_appear(SWITCH_OVER, skip_first_screenshot=True)
|
||||
|
||||
FLEET_NUM.load_color(self.device.image)
|
||||
FLEET_NUM._match_init = True
|
||||
@@ -37,7 +35,6 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand
|
||||
if not FLEET_NUM.match(self.device.image, offset=(0, 0), threshold=0.9):
|
||||
break
|
||||
logger.warning('Fleet switch failed. Retrying.')
|
||||
return True
|
||||
|
||||
def enter_map(self, button, mode='normal'):
|
||||
"""Enter a campaign.
|
||||
|
||||
Reference in New Issue
Block a user