mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-02 07:14:07 +08:00
Fix: On first round, often same ship is detected as new ship
Disabling ensure_template repairs this behavior and retains if new ship is actually detected
This commit is contained in:
@@ -21,6 +21,7 @@ class Equipment(UI):
|
|||||||
swipe_timer = Timer(5, count=10)
|
swipe_timer = Timer(5, count=10)
|
||||||
self.ensure_no_info_bar(timeout=3)
|
self.ensure_no_info_bar(timeout=3)
|
||||||
SWIPE_CHECK.load_color(self.device.image)
|
SWIPE_CHECK.load_color(self.device.image)
|
||||||
|
SWIPE_CHECK._match_init = True # Disable ensure_template() on match(), allows ship to be properly determined whether different or not
|
||||||
while 1:
|
while 1:
|
||||||
if not swipe_timer.started() or swipe_timer.reached():
|
if not swipe_timer.started() or swipe_timer.reached():
|
||||||
swipe_timer.reset()
|
swipe_timer.reset()
|
||||||
@@ -32,7 +33,7 @@ class Equipment(UI):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
if SWIPE_CHECK.match(self.device.image):
|
if SWIPE_CHECK.match(self.device.image):
|
||||||
if swipe_count > 1:
|
if swipe_count > 1:
|
||||||
logger.warning('Same ship on multiple swipes')
|
logger.info('Same ship on multiple swipes')
|
||||||
return False
|
return False
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user