From 6fd60d150e070dd2363d7cded83537515d60fba9 Mon Sep 17 00:00:00 2001 From: MetalStormGhost Date: Tue, 19 Sep 2023 11:11:37 +0300 Subject: [PATCH] Raise NoParkingSlotError instead of RuntimeError when running out of ground spawns. --- game/missiongenerator/aircraft/flightgroupspawner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/missiongenerator/aircraft/flightgroupspawner.py b/game/missiongenerator/aircraft/flightgroupspawner.py index 6514f253..bec3f522 100644 --- a/game/missiongenerator/aircraft/flightgroupspawner.py +++ b/game/missiongenerator/aircraft/flightgroupspawner.py @@ -436,7 +436,9 @@ class FlightGroupSpawner: ) group.units[1 + i].heading = ground_spawn[0].units[0].heading except IndexError as ex: - raise RuntimeError(f"Not enough STOL slots available at {cp}") from ex + raise NoParkingSlotError( + f"Not enough STOL slots available at {cp}" + ) from ex return group def dcs_start_type(self) -> DcsStartType: