From a80a16eb91030c8dd2e6454869efc29314dfd39d Mon Sep 17 00:00:00 2001 From: padtrack <60636294+padtrack@users.noreply.github.com> Date: Thu, 28 Mar 2024 20:48:51 -0700 Subject: [PATCH] hopefully fix 13.2.0 issue with consumables --- .../clients/wows/versions/13_2_0/battle_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/replay_unpack/clients/wows/versions/13_2_0/battle_controller.py b/src/replay_unpack/clients/wows/versions/13_2_0/battle_controller.py index 7012df20..2653e396 100644 --- a/src/replay_unpack/clients/wows/versions/13_2_0/battle_controller.py +++ b/src/replay_unpack/clients/wows/versions/13_2_0/battle_controller.py @@ -175,7 +175,7 @@ def __init__(self): Entity.subscribe_method_call( "Vehicle", - "consumableUsed", + "onConsumableUsed", self._on_consumable_used, ) Entity.subscribe_method_call( @@ -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):