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

@ -15,7 +15,7 @@ class Charge(Action):
def do(self, entity, state) -> Union[None, ActionResult]:
if charge_pod := h.get_first(state[b.CHARGE_PODS].by_pos(entity.pos)):
valid = h.get_first(charge_pod.charge_battery(state[b.BATTERIES].by_entity(entity)))
valid = h.get_first(charge_pod.charge_battery(entity, state))
if valid:
state.print(f'{entity.name} just charged batteries at {charge_pod.name}.')
else: