mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Autoplan Air-to-Air Escorts for AWACS & Tankers
This commit is contained in:
@@ -102,8 +102,14 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
|
||||
state.context.settings,
|
||||
)
|
||||
with state.context.tracer.trace(f"{color} {self.flights[0].task} planning"):
|
||||
asap = False
|
||||
if (
|
||||
not state.context.coalition.ato.has_awacs_package
|
||||
and FlightType.AEWC in [f.task for f in self.flights]
|
||||
):
|
||||
asap = True
|
||||
self.package = fulfiller.plan_mission(
|
||||
ProposedMission(self.target, self.flights),
|
||||
ProposedMission(self.target, self.flights, asap=asap),
|
||||
self.purchase_multiplier,
|
||||
state.context.now,
|
||||
state.context.tracer,
|
||||
|
||||
@@ -25,6 +25,7 @@ class PlanAewc(PackagePlanningTask[MissionTarget]):
|
||||
|
||||
def propose_flights(self) -> None:
|
||||
self.propose_flight(FlightType.AEWC, 1)
|
||||
self.propose_flight(FlightType.ESCORT, 2)
|
||||
|
||||
@property
|
||||
def asap(self) -> bool:
|
||||
|
||||
@@ -25,3 +25,4 @@ class PlanRefueling(PackagePlanningTask[MissionTarget]):
|
||||
|
||||
def propose_flights(self) -> None:
|
||||
self.propose_flight(FlightType.REFUELING, 1)
|
||||
self.propose_flight(FlightType.ESCORT, 2)
|
||||
|
||||
Reference in New Issue
Block a user