Add CTLD script and update JTACAutoLase config

- Added the CTLD script
- Removed the previous jtacautolase script
- Updated the configuration to allow the JTACAutoLase function to work
- Added the JTac name, freq and mod to the lua
This commit is contained in:
RndName
2022-04-02 14:12:40 +02:00
parent 0a7ded4052
commit de148dbb61
10 changed files with 6550 additions and 805 deletions

View File

@@ -146,7 +146,7 @@ class FlotGenerator:
# If the option fc3LaserCode is enabled, force all JTAC
# laser codes to 1113 to allow lasing for Su-25 Frogfoots and A-10A Warthogs.
# Otherwise use 1688 for the first JTAC, 1687 for the second etc.
if self.game.settings.plugins["plugins.jtacautolase.fc3LaserCode"]:
if self.game.settings.plugins["plugins.ctld.fc3LaserCode"]:
code = 1113
else:
code = self.laser_code_registry.get_next_laser_code()

View File

@@ -77,6 +77,17 @@ class LuaGenerator:
jtac_item.add_key_value("zone", jtac.region)
jtac_item.add_key_value("dcsUnit", jtac.unit_name)
jtac_item.add_key_value("laserCode", jtac.code)
jtac_item.add_key_value("radio", str(jtac.freq.mhz))
jtac_item.add_key_value("modulation", jtac.freq.modulation.name)
logistics_object = lua_data.add_item("Logistics")
for logistic_info in self.air_support.logistics.values():
logistics_item = logistics_object.add_item()
logistics_item.add_data_array("pilot_names", logistic_info.pilot_names)
logistics_item.add_key_value("pickup_zone", logistic_info.pickup_zone)
logistics_item.add_key_value("drop_off_zone", logistic_info.drop_off_zone)
logistics_item.add_key_value("target_zone", logistic_info.target_zone)
logistics_item.add_key_value("side", str(2 if logistic_info.blue else 1))
target_points = lua_data.add_item("TargetPoints")
for flight in self.flights: