mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Skynet additional settings (#443)
This commit is contained in:
parent
4e6b4a9b5d
commit
3e1f0bc694
@ -33,24 +33,79 @@
|
|||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameInUI": "Enable Mobile SAMs",
|
"nameInUI": "Enable Mobile SAMs SHORAD (SA-8/9/13/15/19)",
|
||||||
"mnemonic": "actMobile",
|
"mnemonic": "actMobile",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameInUI": "Maximum emission time (s) for Mobile SAMs",
|
"nameInUI": "Maximum emission time (s) for Mobile SHORAD",
|
||||||
"mnemonic": "actMobileMaxEmissionTime",
|
"mnemonic": "actMobileMaxEmissionTime",
|
||||||
"defaultValue": 120
|
"defaultValue": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameInUI": "Minimum scoot distance (m) for Mobile SAMs",
|
"nameInUI": "Minimum scoot distance (m) for Mobile SHORAD",
|
||||||
"mnemonic": "actMobileMinimumScootDistance",
|
"mnemonic": "actMobileMinimumScootDistance",
|
||||||
|
"defaultValue": 300
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Maximum scoot distance (m) for Mobile SHORAD",
|
||||||
|
"mnemonic": "actMobileMaximumScootDistance",
|
||||||
"defaultValue": 500
|
"defaultValue": 500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nameInUI": "Maximum scoot distance (m) for Mobile SAMs",
|
"nameInUI": "Exclude SA-15",
|
||||||
"mnemonic": "actMobileMaximumScootDistance",
|
"mnemonic": "actMobile_exclude_SA15",
|
||||||
|
"defaultValue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Enable Mobile SAMs MERAD (SA-6/11/17)",
|
||||||
|
"mnemonic": "actMobile_merad",
|
||||||
|
"defaultValue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Maximum emission time (s) for Mobile MERAD",
|
||||||
|
"mnemonic": "actMobileMaxEmissionTime_merad",
|
||||||
|
"defaultValue": 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Minimum scoot distance (m) for Mobile MERAD",
|
||||||
|
"mnemonic": "actMobileMinimumScootDistance_merad",
|
||||||
|
"defaultValue": 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Maximum scoot distance (m) for Mobile MERAD",
|
||||||
|
"mnemonic": "actMobileMaximumScootDistance_merad",
|
||||||
"defaultValue": 3000
|
"defaultValue": 3000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "Adjust default SAMs GoLiveRange",
|
||||||
|
"mnemonic": "adjustGoLiveRange",
|
||||||
|
"defaultValue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "SA-5 GoLiveRange (% max interceptor range)",
|
||||||
|
"mnemonic": "adjustGoLiveRange_SA5",
|
||||||
|
"defaultValue": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "SA-10 GoLiveRange (% max interceptor range)",
|
||||||
|
"mnemonic": "adjustGoLiveRange_SA10",
|
||||||
|
"defaultValue": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "SA-17 GoLiveRange (% max interceptor range)",
|
||||||
|
"mnemonic": "adjustGoLiveRange_SA17",
|
||||||
|
"defaultValue": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "SA-20 GoLiveRange (% max interceptor range)",
|
||||||
|
"mnemonic": "adjustGoLiveRange_SA20",
|
||||||
|
"defaultValue": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nameInUI": "SA-23 GoLiveRange (% max interceptor range)",
|
||||||
|
"mnemonic": "adjustGoLiveRange_SA23",
|
||||||
|
"defaultValue": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"scriptsWorkOrders": [
|
"scriptsWorkOrders": [
|
||||||
|
|||||||
@ -18,10 +18,21 @@ if dcsRetribution and SkynetIADS then
|
|||||||
local includeBlueInRadio = false
|
local includeBlueInRadio = false
|
||||||
local debugRED = false
|
local debugRED = false
|
||||||
local debugBLUE = false
|
local debugBLUE = false
|
||||||
local actMobile = false
|
local actMobile = false -- did not change to actMobile_shorad for backwards compatibility
|
||||||
local actMobileMaxEmissionTime = 120
|
local actMobileMaxEmissionTime = 30
|
||||||
local actMobileMinimumScootDistance = 500
|
local actMobileMinimumScootDistance = 300
|
||||||
local actMobileMaximumScootDistance = 3000
|
local actMobileMaximumScootDistance = 500
|
||||||
|
local actMobile_exclude_SA15 = false
|
||||||
|
local actMobile_merad = false
|
||||||
|
local actMobileMaxEmissionTime_merad = 120
|
||||||
|
local actMobileMinimumScootDistance_merad = 500
|
||||||
|
local actMobileMaximumScootDistance_merad = 3000
|
||||||
|
local adjustGoLiveRange = false
|
||||||
|
local adjustGoLiveRange_SA5 = 100
|
||||||
|
local adjustGoLiveRange_SA10 = 100
|
||||||
|
local adjustGoLiveRange_SA17 = 100
|
||||||
|
local adjustGoLiveRange_SA20 = 100
|
||||||
|
local adjustGoLiveRange_SA23 = 100
|
||||||
|
|
||||||
-- retrieve specific options values
|
-- retrieve specific options values
|
||||||
if dcsRetribution.plugins then
|
if dcsRetribution.plugins then
|
||||||
@ -36,6 +47,17 @@ if dcsRetribution and SkynetIADS then
|
|||||||
actMobileMaxEmissionTime = dcsRetribution.plugins.skynetiads.actMobileMaxEmissionTime
|
actMobileMaxEmissionTime = dcsRetribution.plugins.skynetiads.actMobileMaxEmissionTime
|
||||||
actMobileMinimumScootDistance = dcsRetribution.plugins.skynetiads.actMobileMinimumScootDistance
|
actMobileMinimumScootDistance = dcsRetribution.plugins.skynetiads.actMobileMinimumScootDistance
|
||||||
actMobileMaximumScootDistance = dcsRetribution.plugins.skynetiads.actMobileMaximumScootDistance
|
actMobileMaximumScootDistance = dcsRetribution.plugins.skynetiads.actMobileMaximumScootDistance
|
||||||
|
actMobile_exclude_SA15 = dcsRetribution.plugins.skynetiads.actMobile_exclude_SA15
|
||||||
|
actMobile_merad = dcsRetribution.plugins.skynetiads.actMobile_merad
|
||||||
|
actMobileMaxEmissionTime_merad = dcsRetribution.plugins.skynetiads.actMobileMaxEmissionTime_merad
|
||||||
|
actMobileMinimumScootDistance_merad = dcsRetribution.plugins.skynetiads.actMobileMinimumScootDistance_merad
|
||||||
|
actMobileMaximumScootDistance_merad = dcsRetribution.plugins.skynetiads.actMobileMaximumScootDistance_merad
|
||||||
|
adjustGoLiveRange = dcsRetribution.plugins.skynetiads.adjustGoLiveRange
|
||||||
|
adjustGoLiveRange_SA5 = dcsRetribution.plugins.skynetiads.adjustGoLiveRange_SA5
|
||||||
|
adjustGoLiveRange_SA10 = dcsRetribution.plugins.skynetiads.adjustGoLiveRange_SA10
|
||||||
|
adjustGoLiveRange_SA17 = dcsRetribution.plugins.skynetiads.adjustGoLiveRange_SA17
|
||||||
|
adjustGoLiveRange_SA20 = dcsRetribution.plugins.skynetiads.adjustGoLiveRange_SA20
|
||||||
|
adjustGoLiveRange_SA23 = dcsRetribution.plugins.skynetiads.adjustGoLiveRange_SA23
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -194,11 +216,29 @@ if dcsRetribution and SkynetIADS then
|
|||||||
iads:activate()
|
iads:activate()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function initializeMobileSams(iads)
|
local function initializeMobileSams_shorad(iads)
|
||||||
local sams = {"SA-6", "SA-8", "SA-9", "SA-11", "SA-13", "SA-15", "SA-17", "SA-19"}
|
local sams = {"SA-8", "SA-9", "SA-13", "SA-15", "SA-19"}
|
||||||
for _, sam in ipairs(sams) do
|
if actMobile_exclude_SA15 then
|
||||||
iads:getSAMSitesByNatoName(sam):setActMobile(true,actMobileMaxEmissionTime,actMobileMinimumScootDistance,actMobileMaximumScootDistance,nil) --ActMobile
|
local sams = {"SA-8", "SA-9", "SA-13", "SA-19"}
|
||||||
end
|
end
|
||||||
|
for _, sam in ipairs(sams) do
|
||||||
|
iads:getSAMSitesByNatoName(sam):setActMobile(true,actMobileMaxEmissionTime,actMobileMinimumScootDistance,actMobileMaximumScootDistance,nil) --ActMobile SHORAD
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function initializeMobileSams_merad(iads)
|
||||||
|
local sams = {"SA-6", "SA-11", "SA-17"}
|
||||||
|
for _, sam in ipairs(sams) do
|
||||||
|
iads:getSAMSitesByNatoName(sam):setActMobile(true,actMobileMaxEmissionTime_merad,actMobileMinimumScootDistance_merad,actMobileMaximumScootDistance_merad,nil) --ActMobile MERAD
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function setGoLiveRange(iads)
|
||||||
|
iads:getSAMSitesByNatoName('SA-5'):setGoLiveRangeInPercent(adjustGoLiveRange_SA5)
|
||||||
|
iads:getSAMSitesByNatoName('SA-10'):setGoLiveRangeInPercent(adjustGoLiveRange_SA10)
|
||||||
|
iads:getSAMSitesByNatoName('SA-17'):setGoLiveRangeInPercent(adjustGoLiveRange_SA17)
|
||||||
|
iads:getSAMSitesByNatoName('SA-20'):setGoLiveRangeInPercent(adjustGoLiveRange_SA20)
|
||||||
|
iads:getSAMSitesByNatoName('SA-23'):setGoLiveRangeInPercent(adjustGoLiveRange_SA23)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -210,7 +250,13 @@ if dcsRetribution and SkynetIADS then
|
|||||||
local redIADS = SkynetIADS:create("IADS")
|
local redIADS = SkynetIADS:create("IADS")
|
||||||
initializeIADS(redIADS, 1, includeRedInRadio, debugRED) -- RED
|
initializeIADS(redIADS, 1, includeRedInRadio, debugRED) -- RED
|
||||||
if actMobile then
|
if actMobile then
|
||||||
initializeMobileSams(redIADS)
|
initializeMobileSams_shorad(redIADS)
|
||||||
|
end
|
||||||
|
if actMobile_merad then
|
||||||
|
initializeMobileSams_merad(redIADS)
|
||||||
|
end
|
||||||
|
if adjustGoLiveRange then
|
||||||
|
setGoLiveRange(redIADS)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -219,7 +265,13 @@ if dcsRetribution and SkynetIADS then
|
|||||||
local blueIADS = SkynetIADS:create("IADS")
|
local blueIADS = SkynetIADS:create("IADS")
|
||||||
initializeIADS(blueIADS, 2, includeBlueInRadio, debugBLUE) -- BLUE
|
initializeIADS(blueIADS, 2, includeBlueInRadio, debugBLUE) -- BLUE
|
||||||
if actMobile then
|
if actMobile then
|
||||||
initializeMobileSams(blueIADS)
|
initializeMobileSams_shorad(blueIADS)
|
||||||
|
end
|
||||||
|
if actMobile_merad then
|
||||||
|
initializeMobileSams_merad(blueIADS)
|
||||||
|
end
|
||||||
|
if adjustGoLiveRange then
|
||||||
|
setGoLiveRange(blueIADS)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user