mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
- 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
67 lines
3.2 KiB
Lua
67 lines
3.2 KiB
Lua
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
-- configuration file for the CTLD Plugin including the JTAC Autolase
|
|
--
|
|
-- This configuration is tailored for a mission generated by DCS Liberation
|
|
-- see https://github.com/dcs-liberation/dcs_liberation
|
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
-- CTLD plugin - configuration
|
|
if dcsLiberation then
|
|
local ctld_pickup_smoke = "none"
|
|
local ctld_dropoff_smoke = "none"
|
|
|
|
-- JTACAutoLase specific options
|
|
local autolase = false
|
|
local smoke = false
|
|
local fc3LaserCode = false
|
|
|
|
-- retrieve specific options values
|
|
if dcsLiberation.plugins then
|
|
if dcsLiberation.plugins.ctld then
|
|
env.info("DCSLiberation|CTLD plugin - Setting Up")
|
|
|
|
ctld.Debug = dcsLiberation.plugins.ctld.debug
|
|
ctld.Trace = dcsLiberation.plugins.ctld.debug
|
|
ctld.transportPilotNames = {}
|
|
ctld.pickupZones = {}
|
|
ctld.dropOffZones = {}
|
|
ctld.wpZones = {}
|
|
|
|
for _, item in pairs(dcsLiberation.Logistics) do
|
|
for _, pilot in pairs(item.pilot_names) do
|
|
table.insert(ctld.transportPilotNames, pilot)
|
|
end
|
|
if dcsLiberation.plugins.ctld.smoke then
|
|
ctld_pickup_smoke = "blue"
|
|
ctld_dropoff_smoke = "green"
|
|
end
|
|
table.insert(ctld.pickupZones, { item.pickup_zone, ctld_pickup_smoke, -1, "yes", tonumber(item.side) })
|
|
table.insert(ctld.dropOffZones, { item.drop_off_zone, ctld_dropoff_smoke, tonumber(item.side) })
|
|
table.insert(ctld.wpZones, { item.target_zone, "none", "yes", tonumber(item.side) })
|
|
end
|
|
|
|
autolase = dcsLiberation.plugins.ctld.autolase
|
|
env.info(string.format("DCSLiberation|CTLD plugin - JTAC AutoLase enabled = %s", tostring(autolase)))
|
|
|
|
if autolase then
|
|
smoke = dcsLiberation.plugins.ctld.jtacsmoke
|
|
env.info(string.format("DCSLiberation|CTLD plugin - JTACAutolase smoke = %s", tostring(smoke)))
|
|
|
|
fc3LaserCode = dcsLiberation.plugins.ctld.fc3LaserCode
|
|
env.info(string.format("DCSLiberation|CTLD plugin - JTACAutolase fc3LaserCode = %s", tostring(fc3LaserCode)))
|
|
|
|
-- JTAC Autolase configuration code
|
|
for _, jtac in pairs(dcsLiberation.JTACs) do
|
|
env.info(string.format("DCSLiberation|JTACAutolase - setting up %s", jtac.dcsUnit))
|
|
if fc3LaserCode then
|
|
-- If fc3LaserCode is enabled in the plugin configuration, force the JTAC
|
|
-- laser code to 1113 to allow lasing for Su-25 Frogfoots and A-10A Warthogs.
|
|
jtac.laserCode = 1113
|
|
end
|
|
ctld.JTACAutoLase(jtac.dcsUnit, jtac.laserCode, smoke, 'vehicle', nil, { freq = jtac.radio, mod = jtac.modulation, name = jtac.dcsGroupName })
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|