Fine-tune release of parking slots

This commit is contained in:
Raffson 2024-03-03 12:51:27 +01:00
parent 7a3ca43514
commit bcf8ee9d42
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
3 changed files with 4 additions and 4 deletions

View File

@ -78,8 +78,7 @@ class Migrator:
def _update_control_points(self) -> None: def _update_control_points(self) -> None:
is_sinai = self.game.theater.terrain.name == "SinaiMap" is_sinai = self.game.theater.terrain.name == "SinaiMap"
for cp in self.game.theater.controlpoints: for cp in self.game.theater.controlpoints:
for parking_slot in cp.parking_slots: cp.release_parking_slots()
parking_slot.unit_id = None
is_carrier = cp.is_carrier is_carrier = cp.is_carrier
is_lha = cp.is_lha is_lha = cp.is_lha
is_fob = cp.category == "fob" is_fob = cp.category == "fob"

View File

@ -1021,8 +1021,7 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
# clear the ATO and replan the airlifts with the correct time. # clear the ATO and replan the airlifts with the correct time.
self.ground_unit_orders.process(game, game.conditions.start_time) self.ground_unit_orders.process(game, game.conditions.start_time)
for parking_slot in self.parking_slots: self.release_parking_slots()
parking_slot.unit_id = None
runway_status = self.runway_status runway_status = self.runway_status
if runway_status is not None: if runway_status is not None:

View File

@ -239,5 +239,7 @@ class QWaitingForMissionResultWindow(QDialog):
self.sim_controller.set_game(self.game) self.sim_controller.set_game(self.game)
for _, f in self.game.db.flights.objects.items(): for _, f in self.game.db.flights.objects.items():
f.state.reinitialize(self.game.conditions.start_time) 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) GameUpdateSignal.get_instance().updateGame(self.game)
self.close() self.close()