From 702e29b54b1286e89d1dcbbf2be39dd5a34f50cc Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 17 Oct 2021 13:03:15 -0700 Subject: [PATCH] Fix case of unused aircraft not spawning. This function was exiting too early causing unused aircraft to stop being spawned at *any* airfield as soon as the first full airfield was found. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1566 --- changelog.md | 1 + gen/aircraft.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 0c25ba16..10d47a4a 100644 --- a/changelog.md +++ b/changelog.md @@ -34,6 +34,7 @@ Saves from 4.x are not compatible with 5.0. * **[Mission Generation]** Mission results and other files will now be opened with enforced utf-8 encoding to prevent an issue where destroyed ground units were untracked because of special characters in their names. * **[Mission Generation]** Fixed generation of landing waypoints so that the AI obeys them. * **[Mission Generation]** AI carrier aircraft with a start time of T+0 will now start at T+1s to avoid traffic jams. +* **[Mission Generation]** Fixed cases of unused aircraft not being spawned at airfields as soon as any airport filled up. * **[UI]** Selling of Units is now visible again in the UI dialog and shows the correct amount of sold units * **[UI]** Fixed bug where an incompatible campaign could be generated if no action is taken on the campaign selection screen. diff --git a/gen/aircraft.py b/gen/aircraft.py index fd49df18..165e9964 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -659,8 +659,8 @@ class AircraftConflictGenerator: try: self._spawn_unused_for(squadron, country, faction) except NoParkingSlotError: - # If we run out of parking, stop spawning aircraft. - return + # If we run out of parking, stop spawning aircraft at this base. + break def _spawn_unused_for( self, squadron: Squadron, country: Country, faction: Faction