mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
@@ -3,6 +3,7 @@ from enum import Enum, auto
|
||||
from typing import Optional
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.theater import MissionTarget
|
||||
|
||||
|
||||
@@ -33,6 +34,8 @@ class ProposedFlight:
|
||||
#: field is None.
|
||||
escort_type: Optional[EscortType] = field(default=None)
|
||||
|
||||
preferred_type: Optional[AircraftType] = field(default=None)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.task} {self.num_aircraft} ship"
|
||||
|
||||
|
||||
@@ -49,7 +49,12 @@ class PackageBuilder:
|
||||
pf = self.package.primary_flight
|
||||
heli = pf.is_helo if pf else False
|
||||
squadron = self.air_wing.best_squadron_for(
|
||||
self.package.target, plan.task, plan.num_aircraft, heli, this_turn=True
|
||||
self.package.target,
|
||||
plan.task,
|
||||
plan.num_aircraft,
|
||||
heli,
|
||||
this_turn=True,
|
||||
preferred_type=plan.preferred_type,
|
||||
)
|
||||
if squadron is None:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user