Skip to content

Commit

Permalink
Fix: Reset map_cat_attack_timer after handling retirement
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Sep 9, 2024
1 parent febdb79 commit b3a66c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/retire/retirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def handle_retirement(self):
self._retire_handler(mode='one_click_retire')
self._unable_to_enhance = False
self.interval_reset(IN_RETIREMENT_CHECK)
self.map_cat_attack_timer.reset()
return True
elif self.config.Retirement_RetireMode == 'enhance':
if self.appear_then_click(RETIRE_APPEAR_3, offset=(20, 20), interval=3):
Expand All @@ -367,16 +368,19 @@ def handle_retirement(self):
logger.info('Too few spare docks, retire next time')
self._unable_to_enhance = True
self.interval_reset(DOCK_CHECK)
self.map_cat_attack_timer.reset()
return True
else:
if self.appear_then_click(RETIRE_APPEAR_1, offset=(20, 20), interval=3):
self.interval_clear(IN_RETIREMENT_CHECK)
self.interval_reset([AUTO_SEARCH_MAP_OPTION_OFF, AUTO_SEARCH_MAP_OPTION_ON])
self.map_cat_attack_timer.reset()
return False
if self.appear(IN_RETIREMENT_CHECK, offset=(20, 20), interval=10):
self._retire_handler()
self._unable_to_enhance = False
self.interval_reset(IN_RETIREMENT_CHECK)
self.map_cat_attack_timer.reset()
return True

return False
Expand Down

0 comments on commit b3a66c8

Please sign in to comment.