mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 01:38:21 +08:00
Fix: Catch game died in camera update
This commit is contained in:
@@ -5,7 +5,7 @@ import numpy as np
|
||||
from module.base.timer import Timer
|
||||
from module.base.utils import area_offset
|
||||
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_1_RYZA
|
||||
from module.exception import CampaignEnd, MapDetectionError
|
||||
from module.exception import CampaignEnd, GameNotRunningError, MapDetectionError
|
||||
from module.handler.assets import AUTO_SEARCH_MENU_CONTINUE, GAME_TIPS
|
||||
from module.logger import logger
|
||||
from module.map.map_base import CampaignMap, location2node
|
||||
@@ -179,6 +179,10 @@ class Camera(MapOperation):
|
||||
logger.warning(string)
|
||||
x, y = string.split('=')[1].strip('() ').split(',')
|
||||
self._map_swipe((-int(x.strip()), -int(y.strip())))
|
||||
# Finally check if game is alive
|
||||
elif not self.device.app_is_running():
|
||||
logger.error('Trying to update camera but game died')
|
||||
raise GameNotRunningError
|
||||
else:
|
||||
raise e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user