mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-07 08:26:55 +08:00
Fix: Double clicking EQUIP_OFF after popup confirm on slow devices
This commit is contained in:
parent
bc3f54927e
commit
63c091ba94
@ -154,6 +154,7 @@ class Equipment(StorageHandler):
|
||||
return False
|
||||
|
||||
def ship_equipment_take_off(self, skip_first_screenshot=True):
|
||||
logger.info('Equipment take off')
|
||||
bar_timer = Timer(5)
|
||||
off_timer = Timer(5)
|
||||
confirm_timer = Timer(5)
|
||||
@ -175,11 +176,14 @@ class Equipment(StorageHandler):
|
||||
|
||||
if confirm_timer.reached() and self.handle_popup_confirm('EQUIPMENT_TAKE_OFF'):
|
||||
confirm_timer.reset()
|
||||
off_timer.reset()
|
||||
bar_timer.reset()
|
||||
continue
|
||||
|
||||
if off_timer.reached():
|
||||
if not self.info_bar_count() and self.appear_then_click(EQUIP_OFF, offset=(20, 20)):
|
||||
off_timer.reset()
|
||||
bar_timer.reset()
|
||||
continue
|
||||
|
||||
if bar_timer.reached():
|
||||
@ -188,6 +192,8 @@ class Equipment(StorageHandler):
|
||||
bar_timer.reset()
|
||||
continue
|
||||
|
||||
logger.info('Equipment take off ended')
|
||||
|
||||
def fleet_equipment_take_off(self, enter, long_click, out):
|
||||
"""
|
||||
Args:
|
||||
@ -208,6 +214,7 @@ class Equipment(StorageHandler):
|
||||
self.equipment_has_take_on = False
|
||||
|
||||
def ship_equipment_take_on_preset(self, index, skip_first_screenshot=True):
|
||||
logger.info('Equipment take on preset')
|
||||
bar_timer = Timer(5)
|
||||
on_timer = Timer(5)
|
||||
|
||||
@ -238,8 +245,11 @@ class Equipment(StorageHandler):
|
||||
self.device.click(EQUIP_3)
|
||||
|
||||
on_timer.reset()
|
||||
bar_timer.reset()
|
||||
continue
|
||||
|
||||
logger.info('Equipment take on ended')
|
||||
|
||||
def fleet_equipment_take_on_preset(self, preset_record, enter, long_click, out):
|
||||
"""
|
||||
Args:
|
||||
|
Loading…
Reference in New Issue
Block a user