diff --git a/changelog.md b/changelog.md index acf402c7..7a105b53 100644 --- a/changelog.md +++ b/changelog.md @@ -22,6 +22,7 @@ Saves from 4.x are not compatible with 5.0. ## Fixes * **[Campaign]** Naval control points will no longer claim ground objectives during campaign generation and prevent them from spawning. +* **[UI]** Selling of Units is now visible again in the UI dialog and shows the correct amount of sold units # 4.1.1 diff --git a/game/unitdelivery.py b/game/unitdelivery.py index cf1af512..9bba6130 100644 --- a/game/unitdelivery.py +++ b/game/unitdelivery.py @@ -40,9 +40,8 @@ class PendingUnitDeliveries: def sell(self, units: dict[UnitType[Any], int]) -> None: for k, v in units.items(): - if self.units[k] > v: - self.units[k] -= v - else: + self.units[k] -= v + if self.units[k] == 0: del self.units[k] def refund_all(self, coalition: Coalition) -> None: