mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Move the start type requirement into ControlPoint.
This commit is contained in:
parent
18eb661e84
commit
e0047b1bbc
@ -43,9 +43,8 @@ class PackageBuilder:
|
|||||||
if assignment is None:
|
if assignment is None:
|
||||||
return False
|
return False
|
||||||
airfield, squadron = assignment
|
airfield, squadron = assignment
|
||||||
if isinstance(airfield, OffMapSpawn):
|
start_type = airfield.required_aircraft_start_type
|
||||||
start_type = "In Flight"
|
if start_type is None:
|
||||||
else:
|
|
||||||
start_type = self.start_type
|
start_type = self.start_type
|
||||||
|
|
||||||
flight = Flight(
|
flight = Flight(
|
||||||
|
|||||||
@ -670,6 +670,10 @@ class ControlPoint(MissionTarget, ABC):
|
|||||||
self._coalition = new_coalition
|
self._coalition = new_coalition
|
||||||
self.base.set_strength_to_minimum()
|
self.base.set_strength_to_minimum()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def required_aircraft_start_type(self) -> Optional[str]:
|
||||||
|
return None
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def can_operate(self, aircraft: AircraftType) -> bool:
|
def can_operate(self, aircraft: AircraftType) -> bool:
|
||||||
...
|
...
|
||||||
@ -1106,6 +1110,10 @@ class OffMapSpawn(ControlPoint):
|
|||||||
def can_operate(self, aircraft: AircraftType) -> bool:
|
def can_operate(self, aircraft: AircraftType) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def required_aircraft_start_type(self) -> Optional[str]:
|
||||||
|
return "In Flight"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def heading(self) -> Heading:
|
def heading(self) -> Heading:
|
||||||
return Heading.from_degrees(0)
|
return Heading.from_degrees(0)
|
||||||
|
|||||||
@ -349,13 +349,17 @@ class AirliftPlanner:
|
|||||||
else:
|
else:
|
||||||
transfer = self.transfer
|
transfer = self.transfer
|
||||||
|
|
||||||
|
start_type = squadron.location.required_aircraft_start_type
|
||||||
|
if start_type is None:
|
||||||
|
start_type = self.game.settings.default_start_type
|
||||||
|
|
||||||
flight = Flight(
|
flight = Flight(
|
||||||
self.package,
|
self.package,
|
||||||
self.game.country_for(squadron.player),
|
self.game.country_for(squadron.player),
|
||||||
squadron,
|
squadron,
|
||||||
flight_size,
|
flight_size,
|
||||||
FlightType.TRANSPORT,
|
FlightType.TRANSPORT,
|
||||||
self.game.settings.default_start_type,
|
start_type,
|
||||||
departure=squadron.location,
|
departure=squadron.location,
|
||||||
arrival=squadron.location,
|
arrival=squadron.location,
|
||||||
divert=None,
|
divert=None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user