1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 12:08:21 +08:00

Fix: Reset dock filter if failed to retire any ships

This commit is contained in:
LmeSzinc
2021-07-16 21:10:31 +08:00
parent 09b8d55f15
commit 2900852dd5

View File

@@ -143,8 +143,8 @@ class Retirement(Enhancement):
def retirement_appear(self):
return self.appear(RETIRE_APPEAR_1, offset=30) \
and self.appear(RETIRE_APPEAR_2, offset=30) \
and self.appear(RETIRE_APPEAR_3, offset=30)
and self.appear(RETIRE_APPEAR_2, offset=30) \
and self.appear(RETIRE_APPEAR_3, offset=30)
def _retirement_quit_check_func(self):
return not self.appear(IN_RETIREMENT_CHECK)
@@ -270,6 +270,11 @@ class Retirement(Enhancement):
self.handle_dock_cards_loading()
total = self.retire_ships()
if not total:
logger.warning('No ship retired, trying to reset dock filter and disable favourite, then retire again')
self.dock_filter_set_faster()
self.dock_favourite_set(enable=False)
total = self.retire_ships()
self._retirement_quit()
self.config.DOCK_FULL_TRIGGERED = True