mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-07-13 19:05:16 +08:00
Fix: [EN][JP] private quarters interact button detection restrict to offset top_x and bottom_y (#5800)
Co-authored-by: LmeSzinc <lmeszincsales@gmail.com>
This commit is contained in:
@@ -220,7 +220,7 @@ class PQInteract(UI):
|
|||||||
# Rare case in the middle of dialogue, so address
|
# Rare case in the middle of dialogue, so address
|
||||||
# before initiating room exit
|
# before initiating room exit
|
||||||
if (not self.appear(PRIVATE_QUARTERS_ROOM_CHECK, offset=(20, 20)) and
|
if (not self.appear(PRIVATE_QUARTERS_ROOM_CHECK, offset=(20, 20)) and
|
||||||
not self.appear(PRIVATE_QUARTERS_INTERACT, offset=(0, 60))):
|
not self.appear(PRIVATE_QUARTERS_INTERACT, offset=(-10, 0, 0, 65))):
|
||||||
self._pq_handle_dialogue()
|
self._pq_handle_dialogue()
|
||||||
|
|
||||||
self.interval_clear(PRIVATE_QUARTERS_ROOM_BACK)
|
self.interval_clear(PRIVATE_QUARTERS_ROOM_BACK)
|
||||||
@@ -236,11 +236,14 @@ class PQInteract(UI):
|
|||||||
def pq_interact(self):
|
def pq_interact(self):
|
||||||
"""
|
"""
|
||||||
Execute target interact routine
|
Execute target interact routine
|
||||||
offset=(0, 60) to account for y-position of asset
|
offset=(-10, 0, 0, 65) to account for position of asset
|
||||||
|
top_x=-10, bottom_y=65
|
||||||
Depending on intimacy level, the asset may shift
|
Depending on intimacy level, the asset may shift
|
||||||
|
Parameters identified as stable and server transparent
|
||||||
"""
|
"""
|
||||||
# Click target ship girl for 1st stage sequence
|
# Click target ship girl for 1st stage sequence
|
||||||
logger.hr(f'Interact Start', level=2)
|
logger.hr(f'Interact Start', level=2)
|
||||||
|
interact_offset = (-10, 0, 0, 65)
|
||||||
click_timer = Timer(1.5, count=3).start()
|
click_timer = Timer(1.5, count=3).start()
|
||||||
skip_first_screenshot = True
|
skip_first_screenshot = True
|
||||||
while 1:
|
while 1:
|
||||||
@@ -250,7 +253,7 @@ class PQInteract(UI):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=(0, 60)):
|
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=interact_offset):
|
||||||
break
|
break
|
||||||
|
|
||||||
if click_timer.reached():
|
if click_timer.reached():
|
||||||
@@ -273,7 +276,7 @@ class PQInteract(UI):
|
|||||||
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20)):
|
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20)):
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.appear_then_click(PRIVATE_QUARTERS_INTERACT, offset=(0, 60), interval=1):
|
if self.appear_then_click(PRIVATE_QUARTERS_INTERACT, offset=interact_offset, interval=1):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
skip_first_screenshot = True
|
skip_first_screenshot = True
|
||||||
@@ -284,7 +287,7 @@ class PQInteract(UI):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=(0, 60)):
|
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=interact_offset):
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20), interval=1):
|
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20), interval=1):
|
||||||
|
|||||||
Reference in New Issue
Block a user