mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fix fixed wing squadrons retreating to FARPs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1615 (cherry picked from commit 35900c2350d56ae7354e842dd914dcef7923c973)
This commit is contained in:
parent
a188f7b7e5
commit
d1e50a5bbe
@ -3,17 +3,13 @@ from __future__ import annotations
|
||||
import logging
|
||||
from collections import Iterable
|
||||
from dataclasses import dataclass, field
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Optional,
|
||||
Sequence,
|
||||
)
|
||||
from typing import Optional, Sequence, TYPE_CHECKING
|
||||
|
||||
from faker import Faker
|
||||
|
||||
from game.settings import AutoAtoBehavior, Settings
|
||||
from gen.ato import Package
|
||||
from gen.flights.flight import FlightType, Flight
|
||||
from gen.flights.flight import Flight, FlightType
|
||||
from gen.flights.flightplan import FlightPlanBuilder
|
||||
from .pilot import Pilot, PilotStatus
|
||||
from ..utils import meters
|
||||
@ -265,6 +261,8 @@ class Squadron:
|
||||
return distance_to_target <= self.aircraft.max_mission_range
|
||||
|
||||
def operates_from(self, control_point: ControlPoint) -> bool:
|
||||
if not control_point.can_operate(self.aircraft):
|
||||
return False
|
||||
if control_point.is_carrier:
|
||||
return self.operating_bases.carrier
|
||||
elif control_point.is_lha:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user