dcs-retribution/resources/plugins/jtacautolase/jtacautolase-config.lua
MetalStormGhost b1fee9fe56
Add an option to use FC3-compatible laser codes.
FC3 aircraft don't have laser codes like all the other aircraft do, they just use 1113.
2021-09-05 02:10:24 -07:00

46 lines
2.1 KiB
Lua

-------------------------------------------------------------------------------------------------------------------------------------------------------------
-- configuration file for the JTAC Autolase framework
--
-- This configuration is tailored for a mission generated by DCS Liberation
-- see https://github.com/dcs-liberation/dcs_liberation
-------------------------------------------------------------------------------------------------------------------------------------------------------------
-- JTACAutolase plugin - configuration
env.info("DCSLiberation|JTACAutolase plugin - configuration")
if dcsLiberation then
env.info("DCSLiberation|JTACAutolase plugin - dcsLiberation")
-- specific options
local smoke = false
local fc3LaserCode = false
-- retrieve specific options values
if dcsLiberation.plugins then
env.info("DCSLiberation|JTACAutolase plugin - dcsLiberation.plugins")
if dcsLiberation.plugins.jtacautolase then
env.info("DCSLiberation|JTACAutolase plugin - dcsLiberation.plugins.jtacautolase")
smoke = dcsLiberation.plugins.jtacautolase.smoke
env.info(string.format("DCSLiberation|JTACAutolase plugin - smoke = %s",tostring(smoke)))
fc3LaserCode = dcsLiberation.plugins.jtacautolase.fc3LaserCode
env.info(string.format("DCSLiberation|JTACAutolase plugin - fc3LaserCode = %s",tostring(fc3LaserCode)))
end
end
-- actual configuration code
for _, jtac in pairs(dcsLiberation.JTACs) do
env.info(string.format("DCSLiberation|JTACAutolase plugin - setting up %s",jtac.dcsUnit))
if JTACAutoLase then
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
env.info("DCSLiberation|JTACAutolase plugin - calling JTACAutoLase")
JTACAutoLase(jtac.dcsUnit, jtac.laserCode, smoke, 'vehicle')
end
end
end