Changed tanker_tacan from "N/A" to 0.0 when the tanker is not compatible with TACAN, in order to avoid mission script errors.

This commit is contained in:
MetalStormGhost 2023-09-17 20:37:29 +03:00
parent 585b3e74a0
commit 91cfff58d9
2 changed files with 2 additions and 5 deletions

View File

@ -176,7 +176,7 @@ class PretenseLuaGenerator(LuaGenerator):
for tanker in self.mission_data.tankers:
if tanker.group_name == air_group:
tanker_freq = tanker.freq.hertz / 1000000
tanker_tacan = tanker.tacan if tanker.tacan else "N/A"
tanker_tacan = tanker.tacan.number if tanker.tacan else 0.0
if tanker.variant == "KC-135 Stratotanker":
tanker_variant = "Boom"
lua_string_zones += (
@ -453,7 +453,7 @@ class PretenseLuaGenerator(LuaGenerator):
for tanker in self.mission_data.tankers:
if tanker.group_name == air_group:
tanker_freq = tanker.freq.hertz / 1000000
tanker_tacan = tanker.tacan.number
tanker_tacan = tanker.tacan.number if tanker.tacan else 0.0
if tanker.variant == "KC-135 Stratotanker":
tanker_variant = "Boom"
else:

View File

@ -241,6 +241,3 @@ class PretenseMissionGenerator(MissionGenerator):
if not flight.client_units:
continue
flight.aircraft_type.assign_channels_for_flight(flight, self.mission_data)
if self.game.settings.plugins.get("ewrj"):
self._configure_ewrj(aircraft_generator)