Skip to content

Commit

Permalink
hopefully fix 13.2.0 issue with consumables
Browse files Browse the repository at this point in the history
  • Loading branch information
padtrack committed Mar 29, 2024
1 parent cd50ffe commit a80a16e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def __init__(self):

Entity.subscribe_method_call(
"Vehicle",
"consumableUsed",
"onConsumableUsed",
self._on_consumable_used,
)
Entity.subscribe_method_call(
Expand Down Expand Up @@ -537,10 +537,10 @@ def _update_plane(self, entity: Entity, plane_id: int, pos):
def _remove_plane(self, entity: Entity, plane_id: int):
self._dict_plane.pop(plane_id)

def _on_consumable_used(self, entity: Entity, cid, dur):
def _on_consumable_used(self, entity: Entity, consumableType, workTimeLeft):
consumables = self._acc_consumables.setdefault(entity.id, [])
consumables.append(
Consumable(ship_id=entity.id, consumable_id=cid, duration=dur)
Consumable(ship_id=entity.id, consumable_id=consumableType, duration=workTimeLeft)
)

def _set_visibility_flag(self, entity: Entity, flag: int):
Expand Down

0 comments on commit a80a16e

Please sign in to comment.