mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
remove completely destroyed units from the convoy
(cherry picked from commit 8ba27cdaeae84914aced36851d78f070b1ee1f63)
This commit is contained in:
parent
8fae7decca
commit
251c84019f
@ -99,7 +99,10 @@ class TransferOrder:
|
||||
def kill_unit(self, unit_type: GroundUnitType) -> None:
|
||||
if unit_type not in self.units or not self.units[unit_type]:
|
||||
raise KeyError(f"{self} has no {unit_type} remaining")
|
||||
self.units[unit_type] -= 1
|
||||
if self.units[unit_type] == 1:
|
||||
del self.units[unit_type]
|
||||
else:
|
||||
self.units[unit_type] -= 1
|
||||
|
||||
@property
|
||||
def size(self) -> int:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user