mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 11:07:20 +08:00
Fix: Handle combat submarine icon bug in game
This commit is contained in:
BIN
doc/bugs_in_azurlane_en.assets/combat_submarine_icon_bug.png
Normal file
BIN
doc/bugs_in_azurlane_en.assets/combat_submarine_icon_bug.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
@@ -105,3 +105,14 @@ When switching the submarine zone, the icon in the strategy don't change.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Submarine call icon not loaded in battle
|
||||||
|
|
||||||
|
> Appear time: Unknown
|
||||||
|
>
|
||||||
|
> Found time: 2020.07.01
|
||||||
|
>
|
||||||
|
> Fixed time: Not yet
|
||||||
|
|
||||||
|
After a few battle the icon for calling submarine may not be loaded correctly. If you click on it, it back to normal, if you don't, this bug will still appear in next battle.
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from module.logger import logger
|
|||||||
class SubmarineCall(ModuleBase):
|
class SubmarineCall(ModuleBase):
|
||||||
submarine_call_flag = False
|
submarine_call_flag = False
|
||||||
submarine_call_timer = Timer(5)
|
submarine_call_timer = Timer(5)
|
||||||
|
submarine_call_click_timer = Timer(1)
|
||||||
|
|
||||||
def submarine_call_reset(self):
|
def submarine_call_reset(self):
|
||||||
"""
|
"""
|
||||||
@@ -29,13 +30,20 @@ class SubmarineCall(ModuleBase):
|
|||||||
logger.info('Submarine call timer reached')
|
logger.info('Submarine call timer reached')
|
||||||
self.submarine_call_flag = True
|
self.submarine_call_flag = True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.appear(SUBMARINE_AVAILABLE_CHECK_1) or not self.appear(SUBMARINE_AVAILABLE_CHECK_2):
|
if not self.appear(SUBMARINE_AVAILABLE_CHECK_1) or not self.appear(SUBMARINE_AVAILABLE_CHECK_2):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.appear(SUBMARINE_CALLED):
|
if self.appear(SUBMARINE_CALLED):
|
||||||
logger.info('Submarine called')
|
logger.info('Submarine called')
|
||||||
self.submarine_call_flag = True
|
self.submarine_call_flag = True
|
||||||
return False
|
return False
|
||||||
|
elif self.submarine_call_click_timer.reached():
|
||||||
if self.appear_then_click(SUBMARINE_READY, interval=1):
|
if self.appear_then_click(SUBMARINE_READY):
|
||||||
logger.info('Call submarine')
|
logger.info('Call submarine')
|
||||||
return True
|
return True
|
||||||
|
else:
|
||||||
|
logger.info('Incorrect submarine icon')
|
||||||
|
self.device.click(SUBMARINE_READY)
|
||||||
|
logger.info('Call submarine')
|
||||||
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user