mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Move mission range data into the aircraft type.
The doctrine/task limits were capturing a reasonable average for the era, but it did a bad job for cases like the Harrier vs the Hornet, which perform similar missions but have drastically different max ranges. It also forced us into limiting CAS missions (even those flown by long range aircraft like the A-10) to 50nm since helicopters could commonly be fragged to them. This should allow us to design campaigns without needing airfields to be a max of ~50-100nm apart.
This commit is contained in:
@@ -59,28 +59,23 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
|
||||
coalition.ato.add_package(self.package)
|
||||
|
||||
@abstractmethod
|
||||
def propose_flights(self, doctrine: Doctrine) -> None:
|
||||
def propose_flights(self) -> None:
|
||||
...
|
||||
|
||||
def propose_flight(
|
||||
self,
|
||||
task: FlightType,
|
||||
num_aircraft: int,
|
||||
max_distance: Optional[Distance],
|
||||
escort_type: Optional[EscortType] = None,
|
||||
) -> None:
|
||||
if max_distance is None:
|
||||
max_distance = Distance.inf()
|
||||
self.flights.append(
|
||||
ProposedFlight(task, num_aircraft, max_distance, escort_type)
|
||||
)
|
||||
self.flights.append(ProposedFlight(task, num_aircraft, escort_type))
|
||||
|
||||
@property
|
||||
def asap(self) -> bool:
|
||||
return False
|
||||
|
||||
def fulfill_mission(self, state: TheaterState) -> bool:
|
||||
self.propose_flights(state.context.coalition.doctrine)
|
||||
self.propose_flights()
|
||||
fulfiller = PackageFulfiller(
|
||||
state.context.coalition,
|
||||
state.context.theater,
|
||||
@@ -92,20 +87,9 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
|
||||
)
|
||||
return self.package is not None
|
||||
|
||||
def propose_common_escorts(self, doctrine: Doctrine) -> None:
|
||||
self.propose_flight(
|
||||
FlightType.SEAD_ESCORT,
|
||||
2,
|
||||
doctrine.mission_ranges.offensive,
|
||||
EscortType.Sead,
|
||||
)
|
||||
|
||||
self.propose_flight(
|
||||
FlightType.ESCORT,
|
||||
2,
|
||||
doctrine.mission_ranges.offensive,
|
||||
EscortType.AirToAir,
|
||||
)
|
||||
def propose_common_escorts(self) -> None:
|
||||
self.propose_flight(FlightType.SEAD_ESCORT, 2, EscortType.Sead)
|
||||
self.propose_flight(FlightType.ESCORT, 2, EscortType.AirToAir)
|
||||
|
||||
def iter_iads_ranges(
|
||||
self, state: TheaterState, range_type: RangeType
|
||||
|
||||
Reference in New Issue
Block a user