mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 02:48:23 +08:00
Fix: prevent double dragging in _pq_target_appear
This commit is contained in:
@@ -27,10 +27,12 @@ class PQInteract(UI):
|
||||
Hence this call is used in other states
|
||||
besides on room enter
|
||||
"""
|
||||
|
||||
# Helper funcs to hold off spam clicking until loading
|
||||
# state is not present
|
||||
def after_loading_state():
|
||||
return not self.appear(PRIVATE_QUARTERS_LOADING_CHECK, offset=(20, 20))
|
||||
|
||||
def additional():
|
||||
return True
|
||||
|
||||
@@ -79,12 +81,13 @@ class PQInteract(UI):
|
||||
(0, -30), box=PRIVATE_QUARTERS_ROOM_SAFE_CLICK_AREA.area,
|
||||
random_range=(-10, -10, 10, 10), padding=5)
|
||||
self.device.drag(p1, p2, segments=2,
|
||||
shake=(0, 25), point_random=(0, 0, 0, 0),
|
||||
shake_random=(0, -5, 0, 5))
|
||||
shake=(0, 25), point_random=(0, 0, 0, 0),
|
||||
shake_random=(0, -5, 0, 5))
|
||||
settle_timer.reset()
|
||||
else:
|
||||
# Absence of check likely means dialogue is ongoing
|
||||
self._pq_handle_dialogue()
|
||||
settle_timer.reset();
|
||||
settle_timer.reset()
|
||||
|
||||
def _pq_goto_room_seek(self, target_ship):
|
||||
"""
|
||||
@@ -149,8 +152,11 @@ class PQInteract(UI):
|
||||
"""
|
||||
Callable wrapper for whether is loading or blocked by download asset popup
|
||||
"""
|
||||
return self.appear(PRIVATE_QUARTERS_LOADING_CHECK, offset=(20, 20)) \
|
||||
or self.appear(POPUP_CANCEL, offset=(20, 20))
|
||||
if self.appear(PRIVATE_QUARTERS_LOADING_CHECK, offset=(20, 20)):
|
||||
return True
|
||||
if self.appear(POPUP_CANCEL, offset=(20, 20)):
|
||||
return True
|
||||
return False
|
||||
|
||||
def _pq_goto_room_enter(self, target_ship):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user