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
This commit is contained in:
Dan Albert 2021-10-17 13:03:15 -07:00
parent 0fd911feb1
commit 702e29b54b
2 changed files with 3 additions and 2 deletions

View File

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

View File

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