mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 11:37:23 +08:00
Opt: _pq_target_appear refactor to image wait loop; reduces overall time spent for target detection
This commit is contained in:
@@ -30,9 +30,20 @@ class PrivateQuarters(UI):
|
|||||||
ship, can use the available_targets to store similarly into tuples instead
|
ship, can use the available_targets to store similarly into tuples instead
|
||||||
"""
|
"""
|
||||||
settle_timer = Timer(1.5, count=3).start()
|
settle_timer = Timer(1.5, count=3).start()
|
||||||
settle_timer.wait()
|
skip_first_screenshot = True
|
||||||
self.device.screenshot()
|
while 1:
|
||||||
return self.appear(PRIVATE_QUARTERS_ROOM_TARGET_CHECK, offset=(100, 100))
|
if skip_first_screenshot:
|
||||||
|
skip_first_screenshot = False
|
||||||
|
else:
|
||||||
|
self.device.screenshot()
|
||||||
|
|
||||||
|
# End, success
|
||||||
|
if self.appear(PRIVATE_QUARTERS_ROOM_TARGET_CHECK, offset=(100, 100)):
|
||||||
|
return True
|
||||||
|
|
||||||
|
# End, failed expired wait time
|
||||||
|
if settle_timer.reached():
|
||||||
|
return False
|
||||||
|
|
||||||
def _pq_goto_room_check(self):
|
def _pq_goto_room_check(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user