mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
remove completely destroyed units from the convoy
This commit is contained in:
parent
1c2411a0fc
commit
8ba27cdaea
@ -130,7 +130,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