mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add a feature flag for pilot limits.
This doesn't currently interact very well with the auto purchase since the procurer might by aircraft that don't have pilots available. That should be fixed, but for the short term we should just default to not enabling this new feature.
This commit is contained in:
@@ -178,7 +178,7 @@ class AircraftAllocator:
|
||||
aircraft, task
|
||||
)
|
||||
for squadron in squadrons:
|
||||
if squadron.number_of_available_pilots >= flight.num_aircraft:
|
||||
if squadron.can_provide_pilots(flight.num_aircraft):
|
||||
inventory.remove_aircraft(aircraft, flight.num_aircraft)
|
||||
return airfield, squadron
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user