mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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:
@@ -1,4 +1,4 @@
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
from typing import Any
|
||||
|
||||
@@ -18,15 +18,6 @@ class GroundUnitProcurementRatios:
|
||||
return 0.0
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MissionPlannerMaxRanges:
|
||||
cap: Distance = field(default=nautical_miles(100))
|
||||
cas: Distance = field(default=nautical_miles(50))
|
||||
offensive: Distance = field(default=nautical_miles(150))
|
||||
aewc: Distance = field(default=Distance.inf())
|
||||
refueling: Distance = field(default=nautical_miles(200))
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Doctrine:
|
||||
cas: bool
|
||||
@@ -88,8 +79,6 @@ class Doctrine:
|
||||
|
||||
ground_unit_procurement_ratios: GroundUnitProcurementRatios
|
||||
|
||||
mission_ranges: MissionPlannerMaxRanges = field(default=MissionPlannerMaxRanges())
|
||||
|
||||
@has_save_compat_for(5)
|
||||
def __setstate__(self, state: dict[str, Any]) -> None:
|
||||
if "max_ingress_distance" not in state:
|
||||
@@ -111,6 +100,12 @@ class Doctrine:
|
||||
self.__dict__.update(state)
|
||||
|
||||
|
||||
class MissionPlannerMaxRanges:
|
||||
@has_save_compat_for(5)
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
MODERN_DOCTRINE = Doctrine(
|
||||
cap=True,
|
||||
cas=True,
|
||||
|
||||
Reference in New Issue
Block a user