mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 07:18:22 +08:00
Fix: Too many clicks on SUBMARINE_READY in OpSi battles
This commit is contained in:
@@ -114,6 +114,27 @@ class Device(Screenshot, Control, AppControl, EmulatorManager):
|
|||||||
def click_record_clear(self):
|
def click_record_clear(self):
|
||||||
self.click_record.clear()
|
self.click_record.clear()
|
||||||
|
|
||||||
|
def click_record_remove(self, button):
|
||||||
|
"""
|
||||||
|
Remove a button from `click_record`
|
||||||
|
|
||||||
|
Args:
|
||||||
|
button (Button):
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
int: Number of button removed
|
||||||
|
"""
|
||||||
|
removed = 0
|
||||||
|
for _ in range(self.click_record.maxlen):
|
||||||
|
try:
|
||||||
|
self.click_record.remove(str(button))
|
||||||
|
removed += 1
|
||||||
|
except ValueError:
|
||||||
|
# Value not in queue
|
||||||
|
break
|
||||||
|
|
||||||
|
return removed
|
||||||
|
|
||||||
def click_record_check(self):
|
def click_record_check(self):
|
||||||
"""
|
"""
|
||||||
Raises:
|
Raises:
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ class Combat(Combat_, MapEventHandler):
|
|||||||
|
|
||||||
logger.info('Auto Search combat execute')
|
logger.info('Auto Search combat execute')
|
||||||
self.submarine_call_reset()
|
self.submarine_call_reset()
|
||||||
|
self.device.click_record_clear()
|
||||||
submarine_mode = 'do_not_use'
|
submarine_mode = 'do_not_use'
|
||||||
if self.config.Submarine_Fleet:
|
if self.config.Submarine_Fleet:
|
||||||
submarine_mode = self.config.Submarine_Mode
|
submarine_mode = self.config.Submarine_Mode
|
||||||
|
|||||||
Reference in New Issue
Block a user