1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 02:48:23 +08:00

Fix: Handle pinned zone when moving in globe

- Fix: Get mission in zone [154|NA海域中心|NA OCEAN CENTRAL SECTOR|NA海域中心]
This commit is contained in:
LmeSzinc
2021-04-16 09:44:29 +08:00
parent 5a6a0e24b6
commit b914e017a4
3 changed files with 9 additions and 1 deletions

View File

@@ -44,7 +44,9 @@ class GlobeOperation(UI, MapEventHandler):
bool: If handled.
"""
if self.is_zone_pinned():
self.device.click(ZONE_PINNED)
# A click does not disable pinned zone, a swipe does.
self.device.swipe((50, -50), box=area_pad(ZONE_PINNED.area, pad=-80), random_range=(-10, -10, 10, 10),
padding=0, name='PINNED_DISABLE')
return True
return False

View File

@@ -59,6 +59,7 @@ class OperationSiren(OSMap):
if not self.is_in_globe():
logger.warning('Trying to move in globe, but not in os globe map')
raise ScriptError('Trying to move in globe, but not in os globe map')
self.ensure_no_zone_pinned()
self.globe_update()
self.globe_focus_to(zone)
self.zone_type_select(types=types)