1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +08:00

Fix: MapDetectionError raised in submarine move (#937)

This commit is contained in:
LmeSzinc
2022-02-17 21:20:59 +08:00
parent 9e5d42a85b
commit 839fb18661
2 changed files with 11 additions and 2 deletions

View File

@@ -110,7 +110,8 @@ class Camera(MapOperation):
self._view_init()
try:
if not self.is_in_map():
if not self.is_in_map() \
and not self.is_in_strategy_submarine_move():
raise MapDetectionError('Image to detect is not in_map')
self.view.load(self.device.image)
except MapDetectionError as e:
@@ -133,7 +134,8 @@ class Camera(MapOperation):
logger.warning('Image is in auto search menu')
self.ensure_auto_search_exit()
raise CampaignEnd('Image is in auto search menu')
elif not self.is_in_map():
elif not self.is_in_map() \
and not self.is_in_strategy_submarine_move():
logger.warning('Image to detect is not in_map')
if self.appear_then_click(GAME_TIPS, offset=(20, 20)):
logger.warning('Game tips found, retrying')