1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 22:08:20 +08:00
This commit is contained in:
GH Action - Upstream Sync
2025-04-09 16:27:52 +00:00
8 changed files with 40 additions and 16 deletions

View File

@@ -35,10 +35,23 @@ OCR_DOCK_SELECTED = DigitCounter(DOCK_SELECTED, threshold=64, name='OCR_DOCK_SEL
class Dock(Equipment):
def handle_dock_cards_loading(self):
# Poor implementation.
self.device.sleep((1, 1.5))
self.device.screenshot()
def handle_dock_cards_loading(self, skip_first_screenshot=True):
# Poor implementation
# confirm_timer method cannot be used
timeout = Timer(1.2, count=1).start()
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
else:
self.device.screenshot()
# Quick exit if dock is empty
if self.appear(DOCK_EMPTY):
logger.info('Dock empty')
break
# Otherwise we just wait 1.2s
if timeout.reached():
break
def dock_favourite_set(self, enable=False, wait_loading=True):
"""