diff --git a/changelog.md b/changelog.md index 6c31edd2..0e779108 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,7 @@ * **[Data]** Corrected the class of the USS Samuel Chase from Logistics to LandingShip, in order to prevent it being spawned as part of AAA sites. * **[Mission Generation]** Helicopters oscillating due to over-speeding * **[Mission Generation]** Fix infinite loop when using "Fast-Forward to first contact" +* **[Capture Logic]** Release all parking slots when an airbase is captured # Retribution v1.2.1 (hotfix) diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 6b7879a3..c78375c4 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -906,12 +906,16 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC): if not tgo.capturable: tgo.clear() + def release_parking_slots(self) -> None: + pass + # TODO: Should be Airbase specific. def capture(self, game: Game, events: GameUpdateEvents, for_player: bool) -> None: new_coalition = game.coalition_for(for_player) self.ground_unit_orders.refund_all(self.coalition) self.retreat_ground_units(game) self.retreat_air_units(game) + self.release_parking_slots() self.depopulate_uncapturable_tgos() self._coalition = new_coalition self.base.set_strength_to_minimum() @@ -1232,6 +1236,10 @@ class Airfield(ControlPoint, CTLD): parking_slots += len(self.airport.parking_slots) return parking_slots + def release_parking_slots(self) -> None: + for slot in self.parking_slots: + slot.unit_id = None + @property def heading(self) -> Heading: return Heading.from_degrees(self.airport.runways[0].heading)