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.
This commit is contained in:
MetalStormGhost
2021-09-05 12:10:24 +03:00
committed by GitHub
parent 2a6f250706
commit b1fee9fe56
3 changed files with 23 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ if dcsLiberation then
-- specific options
local smoke = false
local fc3LaserCode = false
-- retrieve specific options values
if dcsLiberation.plugins then
@@ -22,6 +23,9 @@ if dcsLiberation 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
@@ -29,6 +33,11 @@ if dcsLiberation then
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

View File

@@ -6,6 +6,11 @@
"nameInUI": "Use smoke",
"mnemonic": "smoke",
"defaultValue": true
},
{
"nameInUI": "Use FC3 laser code (1113)",
"mnemonic": "fc3LaserCode",
"defaultValue": false
}
],
"scriptsWorkOrders": [