mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: SubmarineMode not working because handle_submarine_call() received None (#705)
- Opt: Re-check if submarine is clear
This commit is contained in:
parent
08c033a6e1
commit
7f1227aabf
@ -447,6 +447,7 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
|||||||
if auto_mode is None:
|
if auto_mode is None:
|
||||||
auto_mode = self.config.Fleet_Fleet1Mode if fleet_index == 1 else self.config.Fleet_Fleet2Mode
|
auto_mode = self.config.Fleet_Fleet1Mode if fleet_index == 1 else self.config.Fleet_Fleet2Mode
|
||||||
if submarine_mode is None:
|
if submarine_mode is None:
|
||||||
|
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
|
||||||
self.battle_status_click_interval = 7 if save_get_items else 0
|
self.battle_status_click_interval = 7 if save_get_items else 0
|
||||||
|
|||||||
@ -188,19 +188,25 @@ class FleetPreparation(ModuleBase):
|
|||||||
# if not fleet_2.allow():
|
# if not fleet_2.allow():
|
||||||
# self.config.FLEET_2 = 0
|
# self.config.FLEET_2 = 0
|
||||||
|
|
||||||
# Not using fleet 2.
|
if self.config.Fleet_Fleet2:
|
||||||
if not self.config.Fleet_Fleet2:
|
# Using both fleets.
|
||||||
|
# Force to set it again.
|
||||||
|
# Fleets may reversed, because AL no longer treat the fleet with smaller index as first fleet
|
||||||
|
fleet_2.clear()
|
||||||
|
fleet_1.ensure_to_be(self.config.Fleet_Fleet1)
|
||||||
|
fleet_2.ensure_to_be(self.config.Fleet_Fleet2)
|
||||||
|
else:
|
||||||
|
# Not using fleet 2.
|
||||||
if fleet_2.allow():
|
if fleet_2.allow():
|
||||||
fleet_2.clear()
|
fleet_2.clear()
|
||||||
fleet_1.ensure_to_be(self.config.Fleet_Fleet1)
|
fleet_1.ensure_to_be(self.config.Fleet_Fleet1)
|
||||||
self.map_fleet_checked = True
|
|
||||||
return True
|
|
||||||
|
|
||||||
# Using both fleets.
|
# Check if submarine is empty again.
|
||||||
# Force to set it again.
|
if submarine.allow():
|
||||||
# Fleets may reversed, because AL no longer treat the fleet with smaller index as first fleet
|
if self.config.Submarine_Fleet:
|
||||||
fleet_2.clear()
|
pass
|
||||||
fleet_1.ensure_to_be(self.config.Fleet_Fleet1)
|
else:
|
||||||
fleet_2.ensure_to_be(self.config.Fleet_Fleet2)
|
submarine.clear()
|
||||||
|
|
||||||
self.map_fleet_checked = True
|
self.map_fleet_checked = True
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user