mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Only assign TACAN to compatible tankers
This commit is contained in:
parent
bd3205a442
commit
59871ac36c
@ -201,7 +201,8 @@ class FlightGroupConfigurator:
|
||||
elif isinstance(
|
||||
self.flight.flight_plan, TheaterRefuelingFlightPlan
|
||||
) or isinstance(self.flight.flight_plan, PackageRefuelingFlightPlan):
|
||||
if self.flight.tacan is None:
|
||||
tacan = self.flight.tacan
|
||||
if tacan is None and self.flight.squadron.aircraft.dcs_unit_type.tacan:
|
||||
tacan = self.tacan_registry.alloc_for_band(
|
||||
TacanBand.Y, TacanUsage.AirToAir
|
||||
)
|
||||
|
||||
@ -68,9 +68,9 @@ class RaceTrackBuilder(PydcsWaypointBuilder):
|
||||
def configure_refueling_actions(self, waypoint: MovingPoint) -> None:
|
||||
waypoint.add_task(Tanker())
|
||||
|
||||
if self.flight.unit_type.dcs_unit_type.tacan:
|
||||
tanker_info = self.mission_data.tankers[-1]
|
||||
tacan = tanker_info.tacan
|
||||
tanker_info = self.mission_data.tankers[-1]
|
||||
tacan = tanker_info.tacan
|
||||
if self.flight.unit_type.dcs_unit_type.tacan and tacan:
|
||||
if self.flight.tcn_name is None:
|
||||
cs = tanker_info.callsign[:-2]
|
||||
csn = tanker_info.callsign[-1]
|
||||
|
||||
@ -602,7 +602,7 @@ class SupportPage(KneeboardPage):
|
||||
tanker.callsign,
|
||||
"Tanker",
|
||||
KneeboardPageWriter.wrap_line(tanker.variant, 21),
|
||||
str(tanker.tacan),
|
||||
str(tanker.tacan) if tanker.tacan else "N/A",
|
||||
self.format_frequency(tanker.freq),
|
||||
"TOT: " + tot + "\n" + "TOS: " + tos,
|
||||
]
|
||||
|
||||
@ -71,9 +71,8 @@ class LuaGenerator:
|
||||
tanker_item.add_key_value("callsign", tanker.callsign)
|
||||
tanker_item.add_key_value("variant", tanker.variant)
|
||||
tanker_item.add_key_value("radio", str(tanker.freq.mhz))
|
||||
tanker_item.add_key_value(
|
||||
"tacan", str(tanker.tacan.number) + tanker.tacan.band.name
|
||||
)
|
||||
if tanker.tacan:
|
||||
tanker_item.add_key_value("tacan", str(tanker.tacan))
|
||||
|
||||
awacs_object = lua_data.add_item("AWACs")
|
||||
for awacs in self.mission_data.awacs:
|
||||
|
||||
@ -42,7 +42,7 @@ class TankerInfo(GroupInfo):
|
||||
"""Tanker information for the kneeboard."""
|
||||
|
||||
variant: str
|
||||
tacan: TacanChannel
|
||||
tacan: Optional[TacanChannel]
|
||||
start_time: timedelta
|
||||
end_time: timedelta
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user