Replaced OCA/Runway and OCA/Aircraft mission with Strike missions in the Pretense generator, in order to allow for Pretense campaigns where one (or both) side only has one airbase with a runway.

This commit is contained in:
MetalStormGhost 2024-07-01 13:40:47 +03:00
parent 81ad559ca1
commit ec7982f181

View File

@ -286,8 +286,6 @@ class PretenseAircraftGenerator:
sead_tasks = [FlightType.SEAD, FlightType.SEAD_SWEEP, FlightType.SEAD_ESCORT]
strike_tasks = [
FlightType.STRIKE,
FlightType.OCA_RUNWAY,
FlightType.OCA_AIRCRAFT,
]
patrol_tasks = [
FlightType.BARCAP,
@ -746,11 +744,14 @@ class PretenseAircraftGenerator:
for pilot in squadron.pilot_pool:
pilot.player = True
package = Package(cp, squadron.flight_db, auto_asap=False)
primary_task = squadron.primary_task
if primary_task in [FlightType.OCA_AIRCRAFT, FlightType.OCA_RUNWAY]:
primary_task = FlightType.STRIKE
flight = Flight(
package,
squadron,
aircraft_per_flight,
squadron.primary_task,
primary_task,
squadron.coalition.game.settings.default_start_type_client,
divert=cp,
)