1
0
mirror of https://github.com/sui-feng-cb/AzurLaneAutoScript1.git synced 2026-07-13 02:54:25 +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:
nEEtdo0d
2026-07-09 21:29:04 -04:00
committed by GitHub
parent 9233ca623d
commit f0d7241be4

View File

@@ -220,7 +220,7 @@ class PQInteract(UI):
# Rare case in the middle of dialogue, so address
# before initiating room exit
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.interval_clear(PRIVATE_QUARTERS_ROOM_BACK)
@@ -236,11 +236,14 @@ class PQInteract(UI):
def pq_interact(self):
"""
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
Parameters identified as stable and server transparent
"""
# Click target ship girl for 1st stage sequence
logger.hr(f'Interact Start', level=2)
interact_offset = (-10, 0, 0, 65)
click_timer = Timer(1.5, count=3).start()
skip_first_screenshot = True
while 1:
@@ -250,7 +253,7 @@ class PQInteract(UI):
self.device.screenshot()
# End
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=(0, 60)):
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=interact_offset):
break
if click_timer.reached():
@@ -273,7 +276,7 @@ class PQInteract(UI):
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20)):
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
skip_first_screenshot = True
@@ -284,7 +287,7 @@ class PQInteract(UI):
self.device.screenshot()
# End
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=(0, 60)):
if self.appear(PRIVATE_QUARTERS_INTERACT, offset=interact_offset):
break
if self.appear(PRIVATE_QUARTERS_INTERACT_CHECK, offset=(20, 20), interval=1):