mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-03 23:54:50 +08:00
Fix: Double clicking EQUIP_OFF after popup confirm on slow devices
This commit is contained in:
@@ -154,6 +154,7 @@ class Equipment(StorageHandler):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def ship_equipment_take_off(self, skip_first_screenshot=True):
|
def ship_equipment_take_off(self, skip_first_screenshot=True):
|
||||||
|
logger.info('Equipment take off')
|
||||||
bar_timer = Timer(5)
|
bar_timer = Timer(5)
|
||||||
off_timer = Timer(5)
|
off_timer = Timer(5)
|
||||||
confirm_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'):
|
if confirm_timer.reached() and self.handle_popup_confirm('EQUIPMENT_TAKE_OFF'):
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
off_timer.reset()
|
||||||
|
bar_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if off_timer.reached():
|
if off_timer.reached():
|
||||||
if not self.info_bar_count() and self.appear_then_click(EQUIP_OFF, offset=(20, 20)):
|
if not self.info_bar_count() and self.appear_then_click(EQUIP_OFF, offset=(20, 20)):
|
||||||
off_timer.reset()
|
off_timer.reset()
|
||||||
|
bar_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if bar_timer.reached():
|
if bar_timer.reached():
|
||||||
@@ -188,6 +192,8 @@ class Equipment(StorageHandler):
|
|||||||
bar_timer.reset()
|
bar_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
logger.info('Equipment take off ended')
|
||||||
|
|
||||||
def fleet_equipment_take_off(self, enter, long_click, out):
|
def fleet_equipment_take_off(self, enter, long_click, out):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
@@ -208,6 +214,7 @@ class Equipment(StorageHandler):
|
|||||||
self.equipment_has_take_on = False
|
self.equipment_has_take_on = False
|
||||||
|
|
||||||
def ship_equipment_take_on_preset(self, index, skip_first_screenshot=True):
|
def ship_equipment_take_on_preset(self, index, skip_first_screenshot=True):
|
||||||
|
logger.info('Equipment take on preset')
|
||||||
bar_timer = Timer(5)
|
bar_timer = Timer(5)
|
||||||
on_timer = Timer(5)
|
on_timer = Timer(5)
|
||||||
|
|
||||||
@@ -238,8 +245,11 @@ class Equipment(StorageHandler):
|
|||||||
self.device.click(EQUIP_3)
|
self.device.click(EQUIP_3)
|
||||||
|
|
||||||
on_timer.reset()
|
on_timer.reset()
|
||||||
|
bar_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
logger.info('Equipment take on ended')
|
||||||
|
|
||||||
def fleet_equipment_take_on_preset(self, preset_record, enter, long_click, out):
|
def fleet_equipment_take_on_preset(self, preset_record, enter, long_click, out):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
Reference in New Issue
Block a user