mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Tanker and AWACS frequency, TACAN and variant handling.
This commit is contained in:
parent
aad48c0b78
commit
8dfb05b0d1
@ -22,6 +22,9 @@ from game.ato.flightstate import Completed, WaitingForStart
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.ato.package import Package
|
||||
from game.ato.starttype import StartType
|
||||
from game.missiongenerator.aircraft.flightgroupconfigurator import (
|
||||
FlightGroupConfigurator,
|
||||
)
|
||||
from game.missiongenerator.lasercoderegistry import LaserCodeRegistry
|
||||
from game.missiongenerator.missiondata import MissionData
|
||||
from game.radio.radios import RadioRegistry
|
||||
|
||||
@ -364,29 +364,45 @@ class PretenseLuaGenerator(LuaGenerator):
|
||||
for air_group in self.game.pretense_air[cp_side][cp_name_trimmed][
|
||||
mission_type
|
||||
]:
|
||||
tanker_freq = 257
|
||||
tanker_tacan = 37
|
||||
for tanker in self.mission_data.tankers:
|
||||
if tanker.group_name == air_group:
|
||||
tanker_freq = tanker.freq.hertz / 1000000
|
||||
tanker_tacan = tanker.tacan.number
|
||||
if tanker.variant == "KC-135 Stratotanker":
|
||||
tanker_variant = "Boom"
|
||||
else:
|
||||
tanker_variant = "Drogue"
|
||||
lua_string += (
|
||||
f" presets.missions.{mission_name}:extend"
|
||||
+ "({name='"
|
||||
+ air_group
|
||||
+ "', freq=257, tacan='37', variant=\"Drogue\"}),\n"
|
||||
+ "', freq='"
|
||||
+ str(tanker_freq)
|
||||
+ "', tacan='"
|
||||
+ str(tanker_tacan)
|
||||
+ "', variant='"
|
||||
+ tanker_variant
|
||||
+ "'}),\n"
|
||||
)
|
||||
for tanker in self.mission_data.tankers:
|
||||
if tanker.group_name == air_group:
|
||||
print(tanker)
|
||||
elif mission_type == FlightType.AEWC.name:
|
||||
mission_name = "support.awacs"
|
||||
for air_group in self.game.pretense_air[cp_side][cp_name_trimmed][
|
||||
mission_type
|
||||
]:
|
||||
awacs_freq = 257.5
|
||||
for awacs in self.mission_data.awacs:
|
||||
if awacs.group_name == air_group:
|
||||
awacs_freq = awacs.freq.hertz / 1000000
|
||||
lua_string += (
|
||||
f" presets.missions.{mission_name}:extend"
|
||||
+ "({name='"
|
||||
+ air_group
|
||||
+ "', freq=257.5}),\n"
|
||||
+ "', freq="
|
||||
+ str(awacs_freq)
|
||||
+ "}),\n"
|
||||
)
|
||||
for awacs in self.mission_data.awacs:
|
||||
if awacs.group_name == air_group:
|
||||
print(awacs)
|
||||
lua_string += " }\n"
|
||||
lua_string += " })\n"
|
||||
lua_string += " }\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user