Don't allow helicopters at non-FARP FOBs.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2378.
This commit is contained in:
Dan Albert 2022-10-09 17:37:55 -07:00 committed by Raffson
parent d53bfd4542
commit 9f3f9ad808
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,8 @@ Saves from 5.x are not compatible with 6.0.
* **[Mission Generation]** Fixed an issue where SEAD/DEAD/BAI flights fired all missiles / bombs against a single unit in a group instead of targeting the whole group.
* **[Mission Generation]** Fixed adding additional mission types for a squadron causing error messages when the mission type is not supported by the aircraft type by default
* **[Mission Generation]** AAA ground units now spawn correctly at the frontline
* **[Modding]** Loadouts with invalid weapons (typically new DCS weapons not yet available in Liberation) will be ignored rather than causing an error.
* **[Squadrons]** Helicopter squadrons can no longer be assigned to FOBs that are not FARPs.
* **[UI]** Fixed and issue where the liberation main exe was still running after application close.
* **[UI]** Disable player slots for non-flyable aircraft.

View File

@ -1433,7 +1433,10 @@ class Fob(ControlPoint):
return len(self.helipads)
def can_operate(self, aircraft: AircraftType) -> bool:
return aircraft.helicopter
# FOBs and FARPs are the same class, distinguished only by non-FARP FOBs having
# zero parking.
# https://github.com/dcs-liberation/dcs_liberation/issues/2378
return aircraft.helicopter and self.total_aircraft_parking > 0
@property
def heading(self) -> Heading: