From bcf8ee9d420125fe85c8d6fcc0ac0fd96aca34db Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 3 Mar 2024 12:51:27 +0100 Subject: [PATCH] Fine-tune release of parking slots --- game/migrator.py | 3 +-- game/theater/controlpoint.py | 3 +-- qt_ui/windows/QWaitingForMissionResultWindow.py | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/game/migrator.py b/game/migrator.py index 97b4129e..7d4e2cd2 100644 --- a/game/migrator.py +++ b/game/migrator.py @@ -78,8 +78,7 @@ class Migrator: def _update_control_points(self) -> None: is_sinai = self.game.theater.terrain.name == "SinaiMap" for cp in self.game.theater.controlpoints: - for parking_slot in cp.parking_slots: - parking_slot.unit_id = None + cp.release_parking_slots() is_carrier = cp.is_carrier is_lha = cp.is_lha is_fob = cp.category == "fob" diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 53651529..cc22f5f6 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -1021,8 +1021,7 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC): # clear the ATO and replan the airlifts with the correct time. self.ground_unit_orders.process(game, game.conditions.start_time) - for parking_slot in self.parking_slots: - parking_slot.unit_id = None + self.release_parking_slots() runway_status = self.runway_status if runway_status is not None: diff --git a/qt_ui/windows/QWaitingForMissionResultWindow.py b/qt_ui/windows/QWaitingForMissionResultWindow.py index da1d5aa6..34d19f3b 100644 --- a/qt_ui/windows/QWaitingForMissionResultWindow.py +++ b/qt_ui/windows/QWaitingForMissionResultWindow.py @@ -239,5 +239,7 @@ class QWaitingForMissionResultWindow(QDialog): self.sim_controller.set_game(self.game) for _, f in self.game.db.flights.objects.items(): f.state.reinitialize(self.game.conditions.start_time) + for cp in self.game.theater.controlpoints: + cp.release_parking_slots() GameUpdateSignal.get_instance().updateGame(self.game) self.close()