mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 04:58:22 +08:00
Fix: Equip take on and off, on slow emulators
This commit is contained in:
@@ -140,13 +140,23 @@ class Equipment(StorageHandler):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _equip_take_off_one(self):
|
def _equip_take_off_one(self, skip_first_screenshot=True):
|
||||||
bar_timer = Timer(5)
|
bar_timer = Timer(5)
|
||||||
off_timer = Timer(5)
|
off_timer = Timer(5)
|
||||||
confirm_timer = Timer(5)
|
confirm_timer = Timer(5)
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
if skip_first_screenshot:
|
||||||
|
self.device.screenshot()
|
||||||
|
else:
|
||||||
|
skip_first_screenshot = False
|
||||||
|
|
||||||
|
# End
|
||||||
|
# if self.handle_info_bar():
|
||||||
|
# break
|
||||||
|
if off_timer.started() and self.info_bar_count():
|
||||||
|
break
|
||||||
|
|
||||||
if bar_timer.reached() and not self.appear(EQUIP_1, offset=10):
|
if bar_timer.reached() and not self.appear(EQUIP_1, offset=10):
|
||||||
self.device.click(EQUIPMENT_OPEN)
|
self.device.click(EQUIPMENT_OPEN)
|
||||||
bar_timer.reset()
|
bar_timer.reset()
|
||||||
@@ -162,12 +172,6 @@ class Equipment(StorageHandler):
|
|||||||
if self.handle_storage_full():
|
if self.handle_storage_full():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
|
||||||
# if self.handle_info_bar():
|
|
||||||
# break
|
|
||||||
if off_timer.started() and self.info_bar_count():
|
|
||||||
break
|
|
||||||
|
|
||||||
def equipment_take_off(self, enter, out, fleet):
|
def equipment_take_off(self, enter, out, fleet):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
@@ -189,12 +193,21 @@ class Equipment(StorageHandler):
|
|||||||
self.ui_back(out)
|
self.ui_back(out)
|
||||||
self.equipment_has_take_on = False
|
self.equipment_has_take_on = False
|
||||||
|
|
||||||
def _equip_take_on_one(self, index):
|
def _equip_take_on_one(self, index, skip_first_screenshot=True):
|
||||||
bar_timer = Timer(5)
|
bar_timer = Timer(5)
|
||||||
on_timer = Timer(5)
|
on_timer = Timer(5)
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
if skip_first_screenshot:
|
||||||
|
self.device.screenshot()
|
||||||
|
else:
|
||||||
|
skip_first_screenshot = False
|
||||||
|
|
||||||
|
# End
|
||||||
|
# if self.handle_info_bar():
|
||||||
|
# break
|
||||||
|
if on_timer.started() and self.info_bar_count():
|
||||||
|
break
|
||||||
|
|
||||||
if bar_timer.reached() and not self.appear(EQUIP_1, offset=10):
|
if bar_timer.reached() and not self.appear(EQUIP_1, offset=10):
|
||||||
self.device.click(EQUIPMENT_OPEN)
|
self.device.click(EQUIPMENT_OPEN)
|
||||||
@@ -213,12 +226,6 @@ class Equipment(StorageHandler):
|
|||||||
on_timer.reset()
|
on_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
|
||||||
# if self.handle_info_bar():
|
|
||||||
# break
|
|
||||||
if on_timer.started() and self.info_bar_count():
|
|
||||||
break
|
|
||||||
|
|
||||||
def equipment_take_on(self, enter, out, fleet):
|
def equipment_take_on(self, enter, out, fleet):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
Reference in New Issue
Block a user