Remove max distance for AEW&C auto planning.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1259
This commit is contained in:
Dan Albert 2021-06-19 11:27:52 -07:00
parent 5f8b838652
commit b130c9882a
3 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Saves from 3.x are not compatible with 4.0.
* **[Campaign]** Squadrons now have a maximum size and killed pilots replenish at a limited rate.
* **[Campaign]** Added an option to disable levelling up of AI pilots.
* **[Campaign AI]** AI will plan Tanker flights.
* **[Campaign AI]** Removed max distance for AEW&C auto planning.
* **[Economy]** Adjusted prices for aircraft to balance out some price inconsistencies.
* **[Factions]** Added more tankers to factions.
* **[Flight Planner]** Added ability to plan Tankers.

View File

@ -58,6 +58,10 @@ class Distance:
def from_nautical_miles(cls, value: float) -> Distance:
return cls(value * NM_TO_METERS)
@classmethod
def inf(cls) -> Distance:
return cls.from_meters(math.inf)
def __add__(self, other: Distance) -> Distance:
return meters(self.meters + other.meters)

View File

@ -584,7 +584,7 @@ class CoalitionMissionPlanner:
MAX_OCA_RANGE = nautical_miles(150)
MAX_SEAD_RANGE = nautical_miles(150)
MAX_STRIKE_RANGE = nautical_miles(150)
MAX_AWEC_RANGE = nautical_miles(200)
MAX_AWEC_RANGE = Distance.inf()
MAX_TANKER_RANGE = nautical_miles(200)
def __init__(self, game: Game, is_player: bool) -> None: