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

Fix: Handle port not found in port_goto()

This commit is contained in:
LmeSzinc
2023-01-04 17:34:50 +08:00
parent 9963f4f4e2
commit 93d75ed8f9
3 changed files with 24 additions and 14 deletions

View File

@@ -391,6 +391,10 @@ class OSFleet(OSCamera, Combat, Fleet, OSAsh):
# Calculate destination
grid = self.radar.port_predict(self.device.image)
logger.info(f'Port route at {grid}')
if grid is None:
self.device.screenshot()
continue
radar_arrive = np.linalg.norm(grid) == 0
port_arrive = self.appear(PORT_ENTER, offset=(20, 20))
if port_arrive: