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:
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"

View File

@ -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:

View File

@ -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()