mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
46 lines
2.1 KiB
Lua
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 |