Fixed Battery Charge

This commit is contained in:
Steffen Illium
2023-11-16 17:16:22 +01:00
parent 6c27aa8eaf
commit 67a3f3f342
3 changed files with 7 additions and 7 deletions

View File

@ -26,10 +26,9 @@ class Maintainer(Entity):
self._last_serviced = 'None'
def tick(self, state):
self.clear_temp_state
if found_objective := h.get_first(state[self.objective].by_pos(self.pos)):
if found_objective.name != self._last_serviced:
self.action.do(self, state)
result = self.action.do(self, state)
self._last_serviced = found_objective.name
else:
action = self.get_move_action(state)