mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/Ops
This commit is contained in:
commit
0532c54cd5
3
.gitignore
vendored
3
.gitignore
vendored
@ -228,6 +228,9 @@ pip-log.txt
|
|||||||
#Goodsync
|
#Goodsync
|
||||||
_gsdata_/
|
_gsdata_/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
.idea
|
||||||
|
|
||||||
#GITHUB
|
#GITHUB
|
||||||
Moose Test Missions/MOOSE_Test_Template.miz
|
Moose Test Missions/MOOSE_Test_Template.miz
|
||||||
Moose Development/Moose/.vscode/launch.json
|
Moose Development/Moose/.vscode/launch.json
|
||||||
|
|||||||
@ -7855,7 +7855,6 @@ do -- SET_OPSGROUP
|
|||||||
self:Add( groupname, group )
|
self:Add( groupname, group )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -527,7 +527,7 @@ end
|
|||||||
--- [User] Switch sound output on and use SRS output for sound files.
|
--- [User] Switch sound output on and use SRS output for sound files.
|
||||||
-- @param #AICSAR self
|
-- @param #AICSAR self
|
||||||
-- @param #boolean OnOff Switch on (true) or off (false).
|
-- @param #boolean OnOff Switch on (true) or off (false).
|
||||||
-- @param #string Path Path to your SRS Server Component, e.g. "E:\\\\Program Files\\\\DCS-SimpleRadio-Standalone"
|
-- @param #string Path Path to your SRS Server Component, e.g. "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone"
|
||||||
-- @param #number Frequency Defaults to 243 (guard)
|
-- @param #number Frequency Defaults to 243 (guard)
|
||||||
-- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM
|
-- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM
|
||||||
-- @param #string SoundPath Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor.
|
-- @param #string SoundPath Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor.
|
||||||
@ -538,13 +538,13 @@ function AICSAR:SetSRSRadio(OnOff,Path,Frequency,Modulation,SoundPath,Port)
|
|||||||
self.SRSRadio = OnOff and true
|
self.SRSRadio = OnOff and true
|
||||||
self.SRSTTSRadio = false
|
self.SRSTTSRadio = false
|
||||||
self.SRSFrequency = Frequency or 243
|
self.SRSFrequency = Frequency or 243
|
||||||
self.SRSPath = Path or "c:\\"
|
self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
||||||
self.SRS:SetLabel("ACSR")
|
self.SRS:SetLabel("ACSR")
|
||||||
self.SRS:SetCoalition(self.coalition)
|
self.SRS:SetCoalition(self.coalition)
|
||||||
self.SRSModulation = Modulation or radio.modulation.AM
|
self.SRSModulation = Modulation or radio.modulation.AM
|
||||||
local soundpath = os.getenv('TMP') .. "\\DCS\\Mission\\l10n\\DEFAULT" -- defaults to "l10n/DEFAULT/", i.e. add messages by "Sound to..." in the ME
|
local soundpath = os.getenv('TMP') .. "\\DCS\\Mission\\l10n\\DEFAULT" -- defaults to "l10n/DEFAULT/", i.e. add messages by "Sound to..." in the ME
|
||||||
self.SRSSoundPath = SoundPath or soundpath
|
self.SRSSoundPath = SoundPath or soundpath
|
||||||
self.SRSPort = Port or 5002
|
self.SRSPort = Port or MSRS.port or 5002
|
||||||
if OnOff then
|
if OnOff then
|
||||||
self.SRS = MSRS:New(Path,Frequency,Modulation)
|
self.SRS = MSRS:New(Path,Frequency,Modulation)
|
||||||
self.SRS:SetPort(self.SRSPort)
|
self.SRS:SetPort(self.SRSPort)
|
||||||
@ -570,11 +570,11 @@ function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Cultur
|
|||||||
self.SRSTTSRadio = OnOff and true
|
self.SRSTTSRadio = OnOff and true
|
||||||
self.SRSRadio = false
|
self.SRSRadio = false
|
||||||
self.SRSFrequency = Frequency or 243
|
self.SRSFrequency = Frequency or 243
|
||||||
self.SRSPath = Path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
||||||
self.SRSModulation = Modulation or radio.modulation.AM
|
self.SRSModulation = Modulation or radio.modulation.AM
|
||||||
self.SRSPort = Port or 5002
|
self.SRSPort = Port or MSRS.port or 5002
|
||||||
if OnOff then
|
if OnOff then
|
||||||
self.SRS = MSRS:New(Path,Frequency,Modulation)
|
self.SRS = MSRS:New(self.SRSPath,Frequency,Modulation)
|
||||||
self.SRS:SetPort(self.SRSPort)
|
self.SRS:SetPort(self.SRSPort)
|
||||||
self.SRS:SetCoalition(self.coalition)
|
self.SRS:SetCoalition(self.coalition)
|
||||||
self.SRS:SetLabel("ACSR")
|
self.SRS:SetLabel("ACSR")
|
||||||
@ -582,7 +582,8 @@ function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Cultur
|
|||||||
self.SRS:SetCulture(Culture)
|
self.SRS:SetCulture(Culture)
|
||||||
self.SRS:SetGender(Gender)
|
self.SRS:SetGender(Gender)
|
||||||
if GoogleCredentials then
|
if GoogleCredentials then
|
||||||
self.SRS:SetGoogle(GoogleCredentials)
|
self.SRS:SetProviderOptionsGoogle(GoogleCredentials,GoogleCredentials)
|
||||||
|
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
self.SRSGoogle = true
|
self.SRSGoogle = true
|
||||||
end
|
end
|
||||||
self.SRSQ = MSRSQUEUE:New(self.alias)
|
self.SRSQ = MSRSQUEUE:New(self.alias)
|
||||||
@ -608,8 +609,8 @@ function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender)
|
|||||||
self.SRSPilot:SetLabel("PILOT")
|
self.SRSPilot:SetLabel("PILOT")
|
||||||
if self.SRSGoogle then
|
if self.SRSGoogle then
|
||||||
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
||||||
self.SRSPilot:SetGoogle(poptions.credentials)
|
self.SRSPilot:SetProviderOptionsGoogle(poptions.credentials,poptions.key)
|
||||||
self.SRSPilot:SetGoogleAPIKey(poptions.key)
|
self.SRSPilot:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -632,8 +633,8 @@ function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender)
|
|||||||
self.SRSOperator:SetLabel("RESCUE")
|
self.SRSOperator:SetLabel("RESCUE")
|
||||||
if self.SRSGoogle then
|
if self.SRSGoogle then
|
||||||
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
local poptions = self.SRS:GetProviderOptions(MSRS.Provider.GOOGLE) -- Sound.SRS#MSRS.ProviderOptions
|
||||||
self.SRSOperator:SetGoogle(poptions.credentials)
|
self.SRSOperator:SetProviderOptionsGoogle(poptions.credentials,poptions.key)
|
||||||
self.SRSOperator:SetGoogleAPIKey(poptions.key)
|
self.SRSOperator:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@ -3546,7 +3546,7 @@ end
|
|||||||
-- @param #string To To state.
|
-- @param #string To To state.
|
||||||
function ARTY:onafterRespawn(Controllable, From, Event, To)
|
function ARTY:onafterRespawn(Controllable, From, Event, To)
|
||||||
self:_EventFromTo("onafterRespawn", Event, From, To)
|
self:_EventFromTo("onafterRespawn", Event, From, To)
|
||||||
|
self:I("Respawning arty group")
|
||||||
local group=self.Controllable --Wrapper.Group#GROUP
|
local group=self.Controllable --Wrapper.Group#GROUP
|
||||||
|
|
||||||
-- Respawn group.
|
-- Respawn group.
|
||||||
|
|||||||
@ -74,7 +74,7 @@
|
|||||||
-- @image Designation.JPG
|
-- @image Designation.JPG
|
||||||
--
|
--
|
||||||
-- Date: 24 Oct 2021
|
-- Date: 24 Oct 2021
|
||||||
-- Last Update: Oct 2023
|
-- Last Update: Jan 2024
|
||||||
--
|
--
|
||||||
--- Class AUTOLASE
|
--- Class AUTOLASE
|
||||||
-- @type AUTOLASE
|
-- @type AUTOLASE
|
||||||
@ -87,6 +87,7 @@
|
|||||||
-- @field Core.Set#SET_GROUP RecceSet
|
-- @field Core.Set#SET_GROUP RecceSet
|
||||||
-- @field #table LaserCodes
|
-- @field #table LaserCodes
|
||||||
-- @field #table playermenus
|
-- @field #table playermenus
|
||||||
|
-- @field #boolean smokemenu
|
||||||
-- @extends Ops.Intel#INTEL
|
-- @extends Ops.Intel#INTEL
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -97,6 +98,7 @@ AUTOLASE = {
|
|||||||
verbose = 0,
|
verbose = 0,
|
||||||
alias = "",
|
alias = "",
|
||||||
debug = false,
|
debug = false,
|
||||||
|
smokemenu = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Laser spot info
|
--- Laser spot info
|
||||||
@ -115,7 +117,7 @@ AUTOLASE = {
|
|||||||
|
|
||||||
--- AUTOLASE class version.
|
--- AUTOLASE class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AUTOLASE.version = "0.1.22"
|
AUTOLASE.version = "0.1.23"
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Begin Functional.Autolase.lua
|
-- Begin Functional.Autolase.lua
|
||||||
@ -202,6 +204,7 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
|
|||||||
self.blacklistattributes = {}
|
self.blacklistattributes = {}
|
||||||
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
|
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
|
||||||
self.playermenus = {}
|
self.playermenus = {}
|
||||||
|
self.smokemenu = true
|
||||||
|
|
||||||
-- Set some string id for output to DCS.log file.
|
-- Set some string id for output to DCS.log file.
|
||||||
self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
|
self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
|
||||||
@ -329,9 +332,11 @@ function AUTOLASE:SetPilotMenu()
|
|||||||
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
|
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
|
||||||
self.playermenus[unitname] = lasetopm
|
self.playermenus[unitname] = lasetopm
|
||||||
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
|
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
|
||||||
|
if self.smokemenu then
|
||||||
local smoke = (self.smoketargets == true) and "off" or "on"
|
local smoke = (self.smoketargets == true) and "off" or "on"
|
||||||
local smoketext = string.format("Switch smoke targets to %s",smoke)
|
local smoketext = string.format("Switch smoke targets to %s",smoke)
|
||||||
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
|
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
|
||||||
|
end
|
||||||
for _,_grp in pairs(self.RecceSet.Set) do
|
for _,_grp in pairs(self.RecceSet.Set) do
|
||||||
local grp = _grp -- Wrapper.Group#GROUP
|
local grp = _grp -- Wrapper.Group#GROUP
|
||||||
local unit = grp:GetUnit(1)
|
local unit = grp:GetUnit(1)
|
||||||
@ -451,12 +456,12 @@ end
|
|||||||
function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
|
function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
|
||||||
if OnOff then
|
if OnOff then
|
||||||
self.useSRS = true
|
self.useSRS = true
|
||||||
self.SRSPath = Path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
||||||
self.SRSFreq = Frequency or 271
|
self.SRSFreq = Frequency or 271
|
||||||
self.SRSMod = Modulation or radio.modulation.AM
|
self.SRSMod = Modulation or radio.modulation.AM
|
||||||
self.Gender = Gender or "male"
|
self.Gender = Gender or MSRS.gender or "male"
|
||||||
self.Culture = Culture or "en-US"
|
self.Culture = Culture or MSRS.culture or "en-US"
|
||||||
self.Port = Port or 5002
|
self.Port = Port or MSRS.port or 5002
|
||||||
self.Voice = Voice
|
self.Voice = Voice
|
||||||
self.PathToGoogleKey = PathToGoogleKey
|
self.PathToGoogleKey = PathToGoogleKey
|
||||||
self.Volume = Volume or 1.0
|
self.Volume = Volume or 1.0
|
||||||
@ -470,9 +475,10 @@ function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Cultu
|
|||||||
self.SRS:SetPort(self.Port)
|
self.SRS:SetPort(self.Port)
|
||||||
self.SRS:SetVoice(self.Voice)
|
self.SRS:SetVoice(self.Voice)
|
||||||
self.SRS:SetCoalition(self.coalition)
|
self.SRS:SetCoalition(self.coalition)
|
||||||
self.SRS:SetVolume(Volume)
|
self.SRS:SetVolume(self.Volume)
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
self.SRS:SetGoogle(self.PathToGoogleKey)
|
self.SRS:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
|
||||||
|
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
self.SRSQueue = MSRSQUEUE:New(self.alias)
|
self.SRSQueue = MSRSQUEUE:New(self.alias)
|
||||||
else
|
else
|
||||||
@ -580,6 +586,23 @@ function AUTOLASE:SetSmokeTargets(OnOff,Color)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- (User) Show the "Switch smoke target..." menu entry for pilots. On by default.
|
||||||
|
-- @param #AUTOLASE self
|
||||||
|
-- @return #AUTOLASE self
|
||||||
|
function AUTOLASE:EnableSmokeMenu()
|
||||||
|
self.smokemenu = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- (User) Do not show the "Switch smoke target..." menu entry for pilots.
|
||||||
|
-- @param #AUTOLASE self
|
||||||
|
-- @return #AUTOLASE self
|
||||||
|
function AUTOLASE:DisableSmokeMenu()
|
||||||
|
self.smokemenu = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- (Internal) Function to calculate line of sight.
|
--- (Internal) Function to calculate line of sight.
|
||||||
-- @param #AUTOLASE self
|
-- @param #AUTOLASE self
|
||||||
-- @param Wrapper.Unit#UNIT Unit
|
-- @param Wrapper.Unit#UNIT Unit
|
||||||
|
|||||||
@ -1226,8 +1226,10 @@ function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume,
|
|||||||
self.instructsrsQ = MSRSQUEUE:New("INSTRUCT")
|
self.instructsrsQ = MSRSQUEUE:New("INSTRUCT")
|
||||||
|
|
||||||
if PathToGoogleKey then
|
if PathToGoogleKey then
|
||||||
self.controlmsrs:SetGoogle(PathToGoogleKey)
|
self.controlmsrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
|
||||||
self.instructmsrs:SetGoogle(PathToGoogleKey)
|
self.controlmsrs:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
|
self.instructmsrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
|
||||||
|
self.instructmsrs:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@ -222,6 +222,7 @@ STRATEGO = {
|
|||||||
-- @field #number points
|
-- @field #number points
|
||||||
-- @field #number coalition
|
-- @field #number coalition
|
||||||
-- @field #string coalitionname
|
-- @field #string coalitionname
|
||||||
|
-- @field Core.Point#COORDINATRE coordinate
|
||||||
|
|
||||||
---
|
---
|
||||||
-- @type STRATEGO.Type
|
-- @type STRATEGO.Type
|
||||||
@ -703,14 +704,21 @@ end
|
|||||||
|
|
||||||
--- [USER] Get a list of the nodes with the highest weight.
|
--- [USER] Get a list of the nodes with the highest weight.
|
||||||
-- @param #STRATEGO self
|
-- @param #STRATEGO self
|
||||||
|
-- @param #number Coalition (Optional) Find for this coalition only. E.g. coalition.side.BLUE.
|
||||||
-- @return #table Table of nodes.
|
-- @return #table Table of nodes.
|
||||||
-- @return #number Weight The consolidated weight associated with the nodes.
|
-- @return #number Weight The consolidated weight associated with the nodes.
|
||||||
function STRATEGO:GetHighestWeightNodes()
|
function STRATEGO:GetHighestWeightNodes(Coalition)
|
||||||
self:T(self.lid.."GetHighestWeightNodes")
|
self:T(self.lid.."GetHighestWeightNodes")
|
||||||
local weight = 0
|
local weight = 0
|
||||||
local airbases = {}
|
local airbases = {}
|
||||||
for _name,_data in pairs(self.airbasetable) do
|
for _name,_data in pairs(self.airbasetable) do
|
||||||
if _data.weight >= weight then
|
local okay = true
|
||||||
|
if Coalition then
|
||||||
|
if _data.coalition ~= Coalition then
|
||||||
|
okay = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if _data.weight >= weight and okay then
|
||||||
weight = _data.weight
|
weight = _data.weight
|
||||||
if not airbases[weight] then airbases[weight]={} end
|
if not airbases[weight] then airbases[weight]={} end
|
||||||
table.insert(airbases[weight],_name)
|
table.insert(airbases[weight],_name)
|
||||||
@ -719,16 +727,24 @@ function STRATEGO:GetHighestWeightNodes()
|
|||||||
return airbases[weight],weight
|
return airbases[weight],weight
|
||||||
end
|
end
|
||||||
|
|
||||||
--- [USER] Get a list of the nodes a weight less than the give parameter.
|
--- [USER] Get a list of the nodes a weight less than the given parameter.
|
||||||
-- @param #STRATEGO self
|
-- @param #STRATEGO self
|
||||||
|
-- @param #number Weight Weight - nodes need to have less than this weight.
|
||||||
|
-- @param #number Coalition (Optional) Find for this coalition only. E.g. coalition.side.BLUE.
|
||||||
-- @return #table Table of nodes.
|
-- @return #table Table of nodes.
|
||||||
-- @return #number Weight The consolidated weight associated with the nodes.
|
-- @return #number Weight The consolidated weight associated with the nodes.
|
||||||
function STRATEGO:GetNextHighestWeightNodes(Weight)
|
function STRATEGO:GetNextHighestWeightNodes(Weight, Coalition)
|
||||||
self:T(self.lid.."GetNextHighestWeightNodes")
|
self:T(self.lid.."GetNextHighestWeightNodes")
|
||||||
local weight = 0
|
local weight = 0
|
||||||
local airbases = {}
|
local airbases = {}
|
||||||
for _name,_data in pairs(self.airbasetable) do
|
for _name,_data in pairs(self.airbasetable) do
|
||||||
if _data.weight >= weight and _data.weight < Weight then
|
local okay = true
|
||||||
|
if Coalition then
|
||||||
|
if _data.coalition ~= Coalition then
|
||||||
|
okay = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if _data.weight >= weight and _data.weight < Weight and okay then
|
||||||
weight = _data.weight
|
weight = _data.weight
|
||||||
if not airbases[weight] then airbases[weight]={} end
|
if not airbases[weight] then airbases[weight]={} end
|
||||||
table.insert(airbases[weight],_name)
|
table.insert(airbases[weight],_name)
|
||||||
@ -986,6 +1002,8 @@ function STRATEGO:FindStrategicTargets()
|
|||||||
dist = dist,
|
dist = dist,
|
||||||
points = fpoints,
|
points = fpoints,
|
||||||
coalition = coa,
|
coalition = coa,
|
||||||
|
coalitionname = UTILS.GetCoalitionName(coa),
|
||||||
|
coordinate = self.airbasetable[name].coord,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
local enemycoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
|
local enemycoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
|
||||||
@ -1001,6 +1019,8 @@ function STRATEGO:FindStrategicTargets()
|
|||||||
dist = dist,
|
dist = dist,
|
||||||
points = fpoints,
|
points = fpoints,
|
||||||
coalition = coa,
|
coalition = coa,
|
||||||
|
coalitionname = UTILS.GetCoalitionName(coa),
|
||||||
|
coordinate = self.airbasetable[name].coord,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1031,6 +1051,7 @@ function STRATEGO:FindConsolidationTargets()
|
|||||||
points = fpoints,
|
points = fpoints,
|
||||||
coalition = coa,
|
coalition = coa,
|
||||||
coalitionname = UTILS.GetCoalitionName(coa),
|
coalitionname = UTILS.GetCoalitionName(coa),
|
||||||
|
coordinate = self.airbasetable[name].coord,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
local enemycoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
|
local enemycoa = self.coalition == coalition.side.BLUE and coalition.side.RED or coalition.side.BLUE
|
||||||
@ -1047,6 +1068,7 @@ function STRATEGO:FindConsolidationTargets()
|
|||||||
points = fpoints,
|
points = fpoints,
|
||||||
coalition = coa,
|
coalition = coa,
|
||||||
coalitionname = UTILS.GetCoalitionName(coa),
|
coalitionname = UTILS.GetCoalitionName(coa),
|
||||||
|
coordinate = self.airbasetable[name].coord,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1060,10 +1082,14 @@ end
|
|||||||
-- @param #boolean Enemies (optional) If true, find only enemy neighbors.
|
-- @param #boolean Enemies (optional) If true, find only enemy neighbors.
|
||||||
-- @param #boolean Friends (optional) If true, find only friendly or neutral neighbors.
|
-- @param #boolean Friends (optional) If true, find only friendly or neutral neighbors.
|
||||||
-- @return #table Neighbors Table of #STRATEGO.DistData entries indexed by neighbor node names.
|
-- @return #table Neighbors Table of #STRATEGO.DistData entries indexed by neighbor node names.
|
||||||
|
-- @return #string Nearest Name of the nearest node.
|
||||||
|
-- @return #number Distance Distance of the nearest node.
|
||||||
function STRATEGO:FindNeighborNodes(Name,Enemies,Friends)
|
function STRATEGO:FindNeighborNodes(Name,Enemies,Friends)
|
||||||
self:T(self.lid.."FindNeighborNodes")
|
self:T(self.lid.."FindNeighborNodes")
|
||||||
local neighbors = {}
|
local neighbors = {}
|
||||||
local name = string.gsub(Name,"[%p%s]",".")
|
local name = string.gsub(Name,"[%p%s]",".")
|
||||||
|
local shortestdist = 1000*1000
|
||||||
|
local nearest = nil
|
||||||
for _route,_data in pairs(self.disttable) do
|
for _route,_data in pairs(self.disttable) do
|
||||||
if string.find(_route,name,1,true) then
|
if string.find(_route,name,1,true) then
|
||||||
local dist = self.disttable[_route] -- #STRATEGO.DistData
|
local dist = self.disttable[_route] -- #STRATEGO.DistData
|
||||||
@ -1082,9 +1108,13 @@ function STRATEGO:FindNeighborNodes(Name,Enemies,Friends)
|
|||||||
else
|
else
|
||||||
neighbors[cname] = dist
|
neighbors[cname] = dist
|
||||||
end
|
end
|
||||||
|
if neighbors[cname] and dist.dist < shortestdist then
|
||||||
|
shortestdist = dist.dist
|
||||||
|
nearest = cname
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return neighbors
|
end
|
||||||
|
return neighbors, nearest, shortestdist
|
||||||
end
|
end
|
||||||
|
|
||||||
--- [USER] Find a route between two nodes.
|
--- [USER] Find a route between two nodes.
|
||||||
|
|||||||
@ -1,182 +1,181 @@
|
|||||||
__Moose.Include( 'Scripts/Moose/Utilities/Enums.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Enums.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/FiFo.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Utils.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/Profiler.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Profiler.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/Socket.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Templates.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/STTS.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/STTS.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/Templates.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/FiFo.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Utilities/Utils.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Utilities/Socket.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Base.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Base.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Astar.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Beacon.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Condition.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/UserFlag.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Report.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Scheduler.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/ScheduleDispatcher.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Event.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Settings.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Menu.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Zone.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Zone_Detection.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Database.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Set.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Point.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Velocity.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Message.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Fsm.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Spawn.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/SpawnStatic.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Timer.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Goal.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Spot.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/MarkerOps_Base.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/TextAndSound.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/Pathline.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Core/ClientMenu.lua')
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Astar.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Object.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Beacon.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Identifiable.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Condition.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Positionable.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/ClientMenu.lua')
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Controllable.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Database.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Group.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Event.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Unit.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Fsm.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Client.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Goal.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Static.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/MarkerOps_Base.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Airbase.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Menu.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Scenery.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Message.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Marker.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Point.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Weapon.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Report.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Net.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/ScheduleDispatcher.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Storage.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Scheduler.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Set.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Settings.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Spawn.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/SpawnStatic.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Spot.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/TextAndSound.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Timer.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/UserFlag.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Velocity.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Zone_Detection.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Zone.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Core/Pathline.lua' )
|
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Airbase.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/Cargo.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Client.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoUnit.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Controllable.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoSlingload.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Group.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoCrate.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Identifiable.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoGroup.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Marker.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Object.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Positionable.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Scenery.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Static.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Unit.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Weapon.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Net.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Wrapper/Storage.lua' )
|
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Cargo/Cargo.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Scoring.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Cargo/CargoUnit.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/CleanUp.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Cargo/CargoSlingload.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Movement.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Cargo/CargoCrate.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Sead.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Cargo/CargoGroup.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Escort.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/MissileTrainer.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ATC_Ground.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Detection.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/DetectionZones.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Designate.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/RAT.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Range.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoal.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoalCoalition.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneCaptureCoalition.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Artillery.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Suppression.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/PseudoATC.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Warehouse.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Fox.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Mantis.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Shorad.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AICSAR.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AmmoTruck.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Autolase.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoalCargo.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Tiresias.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Stratego.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/AICSAR.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Airboss.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/AmmoTruck.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RecoveryTanker.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Artillery.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RescueHelo.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/ATC_Ground.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ATIS.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Autolase.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/CleanUp.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CSAR.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Designate.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/AirWing.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Detection.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ArmyGroup.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/DetectionZones.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Auftrag.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Escort.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Awacs.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Fox.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Brigade.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Mantis.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Chief.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/MissileTrainer.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Cohort.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Movement.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Commander.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/PseudoATC.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Fleet.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Range.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/FlightControl.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/RAT.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/FlightGroup.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Scoring.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Flotilla.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Sead.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Intelligence.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Shorad.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Legion.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Suppression.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/NavyGroup.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Warehouse.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Operation.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/ZoneCaptureCoalition.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsGroup.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoal.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsTransport.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCargo.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/OpsZone.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/ZoneGoalCoalition.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Platoon.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Tiresias.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/PlayerTask.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Functional/Stratego.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/PlayerRecce.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Squadron.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Target.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/EasyGCICAP.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Airboss.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Balancer.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/AirWing.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/ArmyGroup.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air_Patrol.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Air_Engage.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Auftrag.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Patrol.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Awacs.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Cap.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Brigade.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Gci.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Chief.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2A_Dispatcher.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Cohort.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_BAI.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Commander.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_CAS.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/CSAR.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_SEAD.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/CTLD.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_A2G_Dispatcher.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Fleet.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Patrol.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/FlightControl.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_CAP.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/FlightGroup.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_CAS.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Flotilla.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_BAI.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Intelligence.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Formation.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Legion.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/NavyGroup.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Request.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Operation.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Dispatcher.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/OpsGroup.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Escort_Dispatcher_Request.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/OpsTransport.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/OpsZone.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_APC.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Platoon.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Helicopter.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/PlayerTask.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Airplane.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/PlayerRecce.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Ship.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/RecoveryTanker.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/RescueHelo.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_APC.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Squadron.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/Target.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Airplane.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Ops/EasyGCICAP.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/AI/AI_Cargo_Dispatcher_Ship.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Balancer.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Assign.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Air.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Route.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Air_Patrol.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Account.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Air_Engage.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Actions/Act_Assist.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Patrol.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Cap.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Gci.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2A_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_BAI.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_CAS.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_SEAD.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_A2G_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Patrol.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_CAP.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_CAS.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_BAI.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Formation.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Escort.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Request.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Escort_Dispatcher_Request.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_APC.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Helicopter.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Airplane.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Ship.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_APC.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Airplane.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/AI/AI_Cargo_Dispatcher_Ship.lua' )
|
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Actions/Act_Assign.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/UserSound.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Actions/Act_Route.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/SoundOutput.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Actions/Act_Account.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/Radio.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Actions/Act_Assist.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/RadioQueue.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/RadioSpeech.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Sound/SRS.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/Radio.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/CommandCenter.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/RadioQueue.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Mission.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/RadioSpeech.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/SoundOutput.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/TaskInfo.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/SRS.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Manager.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Sound/UserSound.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/DetectionManager.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2G_Dispatcher.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2G.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2A_Dispatcher.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_A2A.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_CARGO.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_Transport.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_CSAR.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Cargo_Dispatcher.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Zone.lua' )
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Tasking/Task_Capture_Dispatcher.lua' )
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/CommandCenter.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Globals.lua' )
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Mission.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/TaskInfo.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Manager.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/DetectionManager.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2G_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2G.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_A2A.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_CARGO.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Transport.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_CSAR.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Cargo_Dispatcher.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Capture_Zone.lua' )
|
|
||||||
__Moose.Include( 'Scripts/Moose/Tasking/Task_Capture_Dispatcher.lua' )
|
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Globals.lua' )
|
|
||||||
|
|||||||
@ -3062,7 +3062,7 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
|
|||||||
-- SRS
|
-- SRS
|
||||||
local Frequency = self.AirbossRadio.frequency
|
local Frequency = self.AirbossRadio.frequency
|
||||||
local Modulation = self.AirbossRadio.modulation
|
local Modulation = self.AirbossRadio.modulation
|
||||||
self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,Volume,AltBackend)
|
self.SRS = MSRS:New(PathToSRS,Frequency,Modulation,AltBackend)
|
||||||
self.SRS:SetCoalition(self:GetCoalition())
|
self.SRS:SetCoalition(self:GetCoalition())
|
||||||
self.SRS:SetCoordinate(self:GetCoordinate())
|
self.SRS:SetCoordinate(self:GetCoordinate())
|
||||||
self.SRS:SetCulture(Culture or "en-US")
|
self.SRS:SetCulture(Culture or "en-US")
|
||||||
@ -3072,10 +3072,11 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
|
|||||||
self.SRS:SetPort(Port or 5002)
|
self.SRS:SetPort(Port or 5002)
|
||||||
self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS")
|
self.SRS:SetLabel(self.AirbossRadio.alias or "AIRBOSS")
|
||||||
self.SRS:SetCoordinate(self.carrier:GetCoordinate())
|
self.SRS:SetCoordinate(self.carrier:GetCoordinate())
|
||||||
self.SRS:SetVolume(Volume)
|
self.SRS:SetVolume(Volume or 1)
|
||||||
--self.SRS:SetModulations(Modulations)
|
--self.SRS:SetModulations(Modulations)
|
||||||
if GoogleCreds then
|
if GoogleCreds then
|
||||||
self.SRS:SetGoogle(GoogleCreds)
|
self.SRS:SetProviderOptionsGoogle(GoogleCreds,GoogleCreds)
|
||||||
|
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
if Voice then
|
if Voice then
|
||||||
self.SRS:SetVoice(Voice)
|
self.SRS:SetVoice(Voice)
|
||||||
|
|||||||
@ -434,6 +434,7 @@ _AUFTRAGSNR=0
|
|||||||
-- @field #string ARMORATTACK Armor attack.
|
-- @field #string ARMORATTACK Armor attack.
|
||||||
-- @field #string CASENHANCED Enhanced CAS.
|
-- @field #string CASENHANCED Enhanced CAS.
|
||||||
-- @field #string HOVER Hover.
|
-- @field #string HOVER Hover.
|
||||||
|
-- @field #string LANDATCOORDINATE Land at coordinate.
|
||||||
-- @field #string GROUNDATTACK Ground attack.
|
-- @field #string GROUNDATTACK Ground attack.
|
||||||
-- @field #string CARGOTRANSPORT Cargo transport.
|
-- @field #string CARGOTRANSPORT Cargo transport.
|
||||||
-- @field #string RELOCATECOHORT Relocate a cohort from one legion to another.
|
-- @field #string RELOCATECOHORT Relocate a cohort from one legion to another.
|
||||||
@ -480,6 +481,7 @@ AUFTRAG.Type={
|
|||||||
ARMORATTACK="Armor Attack",
|
ARMORATTACK="Armor Attack",
|
||||||
CASENHANCED="CAS Enhanced",
|
CASENHANCED="CAS Enhanced",
|
||||||
HOVER="Hover",
|
HOVER="Hover",
|
||||||
|
LANDATCOORDINATE="Land at Coordinate",
|
||||||
GROUNDATTACK="Ground Attack",
|
GROUNDATTACK="Ground Attack",
|
||||||
CARGOTRANSPORT="Cargo Transport",
|
CARGOTRANSPORT="Cargo Transport",
|
||||||
RELOCATECOHORT="Relocate Cohort",
|
RELOCATECOHORT="Relocate Cohort",
|
||||||
@ -1052,6 +1054,42 @@ function AUFTRAG:NewHOVER(Coordinate, Altitude, Time, Speed, MissionAlt)
|
|||||||
return mission
|
return mission
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- **[AIR ROTARY]** Create an LANDATCOORDINATE mission.
|
||||||
|
-- @param #AUFTRAG self
|
||||||
|
-- @param Core.Point#COORDINATE Coordinate Where to land.
|
||||||
|
-- @param #number OuterRadius (Optional) Vary the coordinate by this many feet, e.g. get a new random coordinate between OuterRadius and (optionally) avoiding InnerRadius of the coordinate.
|
||||||
|
-- @param #number InnerRadius (Optional) Vary the coordinate by this many feet, e.g. get a new random coordinate between OuterRadius and (optionally) avoiding InnerRadius of the coordinate.
|
||||||
|
-- @param #number Time Time in seconds to stay. Default 300 seconds.
|
||||||
|
-- @param #number Speed Speed in knots to fly to the target coordinate. Default 150kn.
|
||||||
|
-- @param #number MissionAlt Altitude to fly towards the mission in feet AGL. Default 1000ft.
|
||||||
|
-- @return #AUFTRAG self
|
||||||
|
function AUFTRAG:NewLANDATCOORDINATE(Coordinate, OuterRadius, InnerRadius, Time, Speed, MissionAlt)
|
||||||
|
|
||||||
|
local mission=AUFTRAG:New(AUFTRAG.Type.LANDATCOORDINATE)
|
||||||
|
|
||||||
|
mission:_TargetFromObject(Coordinate)
|
||||||
|
|
||||||
|
mission.stayTime = Time or 300
|
||||||
|
mission.stayAt = Coordinate
|
||||||
|
self:SetMissionSpeed(Speed or 150)
|
||||||
|
self:SetMissionAltitude(MissionAlt or 1000)
|
||||||
|
|
||||||
|
if OuterRadius then
|
||||||
|
mission.stayAt = Coordinate:GetRandomCoordinateInRadius(UTILS.FeetToMeters(OuterRadius),UTILS.FeetToMeters(InnerRadius or 0))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Mission options:
|
||||||
|
mission.missionFraction=0.9
|
||||||
|
mission.optionROE=ENUMS.ROE.ReturnFire
|
||||||
|
mission.optionROT=ENUMS.ROT.PassiveDefense
|
||||||
|
|
||||||
|
mission.categories={AUFTRAG.Category.HELICOPTER}
|
||||||
|
|
||||||
|
mission.DCStask=mission:GetDCSMissionTask()
|
||||||
|
|
||||||
|
return mission
|
||||||
|
end
|
||||||
|
|
||||||
--- **[AIR]** Create an enhanced orbit race track mission. Planes will keep closer to the track.
|
--- **[AIR]** Create an enhanced orbit race track mission. Planes will keep closer to the track.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Point#COORDINATE Coordinate Where to start the race track.
|
-- @param Core.Point#COORDINATE Coordinate Where to start the race track.
|
||||||
@ -6446,6 +6484,18 @@ function AUFTRAG:GetDCSMissionTask()
|
|||||||
|
|
||||||
table.insert(DCStasks, DCStask)
|
table.insert(DCStasks, DCStask)
|
||||||
|
|
||||||
|
elseif self.type==AUFTRAG.Type.LANDATCOORDINATE then
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
-- LANDATCOORDINATE Mission
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
local DCStask={}
|
||||||
|
local Vec2 = self.stayAt:GetVec2()
|
||||||
|
local DCStask = CONTROLLABLE.TaskLandAtVec2(nil,Vec2,self.stayTime)
|
||||||
|
|
||||||
|
table.insert(DCStasks, DCStask)
|
||||||
|
|
||||||
elseif self.type==AUFTRAG.Type.ONGUARD or self.type==AUFTRAG.Type.ARMOREDGUARD then
|
elseif self.type==AUFTRAG.Type.ONGUARD or self.type==AUFTRAG.Type.ARMOREDGUARD then
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
|
|||||||
@ -3001,6 +3001,9 @@ function AWACS:_Picture(Group,IsGeneral)
|
|||||||
|
|
||||||
if clustersAO == 0 and clustersEWR == 0 then
|
if clustersAO == 0 and clustersEWR == 0 then
|
||||||
-- clean
|
-- clean
|
||||||
|
local picclean = self.gettext:GetEntry("PICCLEAN",self.locale)
|
||||||
|
text = string.format(picclean,gcallsign,self.callsigntxt)
|
||||||
|
textScreen = text
|
||||||
self:_NewRadioEntry(text,text,GID,Outcome,true,true,false)
|
self:_NewRadioEntry(text,text,GID,Outcome,true,true,false)
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|||||||
@ -293,7 +293,7 @@ CSAR.AircraftType["Bronco-OV-10A"] = 2
|
|||||||
|
|
||||||
--- CSAR class version.
|
--- CSAR class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CSAR.version="1.0.18"
|
CSAR.version="1.0.19"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- ToDo list
|
-- ToDo list
|
||||||
@ -536,6 +536,7 @@ function CSAR:New(Coalition, Template, Alias)
|
|||||||
-- @param #number Frequency Beacon frequency in kHz.
|
-- @param #number Frequency Beacon frequency in kHz.
|
||||||
-- @param #string Leadername Name of the #UNIT of the downed pilot.
|
-- @param #string Leadername Name of the #UNIT of the downed pilot.
|
||||||
-- @param #string CoordinatesText String of the position of the pilot. Format determined by self.coordtype.
|
-- @param #string CoordinatesText String of the position of the pilot. Format determined by self.coordtype.
|
||||||
|
-- @param #string Playername Player name if any given. Might be nil!
|
||||||
|
|
||||||
--- On After "Aproach" event. Heli close to downed Pilot.
|
--- On After "Aproach" event. Heli close to downed Pilot.
|
||||||
-- @function [parent=#CSAR] OnAfterApproach
|
-- @function [parent=#CSAR] OnAfterApproach
|
||||||
@ -842,7 +843,7 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla
|
|||||||
|
|
||||||
self:_CreateDownedPilotTrack(_spawnedGroup,_GroupName,_coalition,_unitName,_text,_typeName,_freq,_playerName,wetfeet)
|
self:_CreateDownedPilotTrack(_spawnedGroup,_GroupName,_coalition,_unitName,_text,_typeName,_freq,_playerName,wetfeet)
|
||||||
|
|
||||||
self:_InitSARForPilot(_spawnedGroup, _unitName, _freq, noMessage) --shagrat use unitName to have the aircraft callsign / descriptive "name" etc.
|
self:_InitSARForPilot(_spawnedGroup, _unitName, _freq, noMessage, _playerName) --shagrat use unitName to have the aircraft callsign / descriptive "name" etc.
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1224,7 +1225,8 @@ end
|
|||||||
-- @param #string _GroupName Name of the Group
|
-- @param #string _GroupName Name of the Group
|
||||||
-- @param #number _freq Beacon frequency.
|
-- @param #number _freq Beacon frequency.
|
||||||
-- @param #boolean _nomessage Send message true or false.
|
-- @param #boolean _nomessage Send message true or false.
|
||||||
function CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage)
|
-- @param #string _playername Name of the downed pilot if any
|
||||||
|
function CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage, _playername)
|
||||||
self:T(self.lid .. " _InitSARForPilot")
|
self:T(self.lid .. " _InitSARForPilot")
|
||||||
local _leader = _downedGroup:GetUnit(1)
|
local _leader = _downedGroup:GetUnit(1)
|
||||||
local _groupName = _GroupName
|
local _groupName = _GroupName
|
||||||
@ -1247,7 +1249,7 @@ function CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- trigger FSM event
|
-- trigger FSM event
|
||||||
self:__PilotDown(2,_downedGroup, _freqk, _groupName, _coordinatesText)
|
self:__PilotDown(2,_downedGroup, _freqk, _groupName, _coordinatesText, _playername)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1923,7 +1925,7 @@ function CSAR:_DisplayToAllSAR(_message, _side, _messagetime)
|
|||||||
local messagetime = _messagetime or self.messageTime
|
local messagetime = _messagetime or self.messageTime
|
||||||
if self.msrs then
|
if self.msrs then
|
||||||
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
|
||||||
if self.msrs.google == nil then
|
if self.msrs:GetProvider() == MSRS.Provider.WINDOWS then
|
||||||
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
|
||||||
end
|
end
|
||||||
self:I("Voice = "..voice)
|
self:I("Voice = "..voice)
|
||||||
@ -2310,7 +2312,8 @@ function CSAR:onafterStart(From, Event, To)
|
|||||||
self.msrs:SetVoice(self.SRSVoice)
|
self.msrs:SetVoice(self.SRSVoice)
|
||||||
self.msrs:SetGender(self.SRSGender)
|
self.msrs:SetGender(self.SRSGender)
|
||||||
if self.SRSGPathToCredentials then
|
if self.SRSGPathToCredentials then
|
||||||
self.msrs:SetGoogle(self.SRSGPathToCredentials)
|
self.msrs:SetProviderOptionsGoogle(self.SRSGPathToCredentials,self.SRSGPathToCredentials)
|
||||||
|
self.msrs:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
self.msrs:SetVolume(self.SRSVolume)
|
self.msrs:SetVolume(self.SRSVolume)
|
||||||
self.msrs:SetLabel("CSAR")
|
self.msrs:SetLabel("CSAR")
|
||||||
@ -2542,8 +2545,9 @@ end
|
|||||||
-- @param #number Frequency Beacon frequency in kHz.
|
-- @param #number Frequency Beacon frequency in kHz.
|
||||||
-- @param #string Leadername Name of the #UNIT of the downed pilot.
|
-- @param #string Leadername Name of the #UNIT of the downed pilot.
|
||||||
-- @param #string CoordinatesText String of the position of the pilot. Format determined by self.coordtype.
|
-- @param #string CoordinatesText String of the position of the pilot. Format determined by self.coordtype.
|
||||||
function CSAR:onbeforePilotDown(From, Event, To, Group, Frequency, Leadername, CoordinatesText)
|
-- @param #string Playername Player name if any given. Might be nil!
|
||||||
self:T({From, Event, To, Group, Frequency, Leadername, CoordinatesText})
|
function CSAR:onbeforePilotDown(From, Event, To, Group, Frequency, Leadername, CoordinatesText, Playername)
|
||||||
|
self:T({From, Event, To, Group, Frequency, Leadername, CoordinatesText, tostring(Playername)})
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1744,7 +1744,7 @@ end
|
|||||||
function CTLD:_GenerateUHFrequencies()
|
function CTLD:_GenerateUHFrequencies()
|
||||||
self:T(self.lid .. " _GenerateUHFrequencies")
|
self:T(self.lid .. " _GenerateUHFrequencies")
|
||||||
self.FreeUHFFrequencies = {}
|
self.FreeUHFFrequencies = {}
|
||||||
self.FreeUHFFrequencies = UTILS.GenerateUHFrequencies()
|
self.FreeUHFFrequencies = UTILS.GenerateUHFrequencies(243,320)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,6 @@
|
|||||||
-- @field #number capalt
|
-- @field #number capalt
|
||||||
-- @field #number capdir
|
-- @field #number capdir
|
||||||
-- @field #number capleg
|
-- @field #number capleg
|
||||||
-- @field #number capgrouping
|
|
||||||
-- @field #number maxinterceptsize
|
-- @field #number maxinterceptsize
|
||||||
-- @field #number missionrange
|
-- @field #number missionrange
|
||||||
-- @field #number noaltert5
|
-- @field #number noaltert5
|
||||||
@ -65,6 +64,7 @@
|
|||||||
-- @field #boolean Monitor
|
-- @field #boolean Monitor
|
||||||
-- @field #boolean TankerInvisible
|
-- @field #boolean TankerInvisible
|
||||||
-- @field #number CapFormation
|
-- @field #number CapFormation
|
||||||
|
-- @field #table ReadyFlightGroups
|
||||||
-- @extends Core.Fsm#FSM
|
-- @extends Core.Fsm#FSM
|
||||||
|
|
||||||
--- *“Airspeed, altitude, and brains. Two are always needed to successfully complete the flight.”* -- Unknown.
|
--- *“Airspeed, altitude, and brains. Two are always needed to successfully complete the flight.”* -- Unknown.
|
||||||
@ -190,7 +190,6 @@ EASYGCICAP = {
|
|||||||
capalt = 25000,
|
capalt = 25000,
|
||||||
capdir = 45,
|
capdir = 45,
|
||||||
capleg = 15,
|
capleg = 15,
|
||||||
capgrouping = 2,
|
|
||||||
maxinterceptsize = 2,
|
maxinterceptsize = 2,
|
||||||
missionrange = 100,
|
missionrange = 100,
|
||||||
noaltert5 = 4,
|
noaltert5 = 4,
|
||||||
@ -209,6 +208,7 @@ EASYGCICAP = {
|
|||||||
Monitor = false,
|
Monitor = false,
|
||||||
TankerInvisible = true,
|
TankerInvisible = true,
|
||||||
CapFormation = nil,
|
CapFormation = nil,
|
||||||
|
ReadyFlightGroups = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Internal Squadron data type
|
--- Internal Squadron data type
|
||||||
@ -244,7 +244,7 @@ EASYGCICAP = {
|
|||||||
|
|
||||||
--- EASYGCICAP class version.
|
--- EASYGCICAP class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
EASYGCICAP.version="0.0.9"
|
EASYGCICAP.version="0.1.10"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@ -258,10 +258,10 @@ EASYGCICAP.version="0.0.9"
|
|||||||
|
|
||||||
--- Create a new GCICAP Manager
|
--- Create a new GCICAP Manager
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #string Alias
|
-- @param #string Alias A Name for this GCICAP
|
||||||
-- @param #string AirbaseName
|
-- @param #string AirbaseName Name of the Home Airbase
|
||||||
-- @param #string Coalition
|
-- @param #string Coalition Coalition, e.g. "blue" or "red"
|
||||||
-- @param #string EWRName
|
-- @param #string EWRName (Partial) group name of the EWR system of the coalition, e.g. "Red EWR"
|
||||||
-- @return #EASYGCICAP self
|
-- @return #EASYGCICAP self
|
||||||
function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
|
function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
|
||||||
-- Inherit everything from FSM class.
|
-- Inherit everything from FSM class.
|
||||||
@ -321,6 +321,7 @@ end
|
|||||||
-- @param #number Formation Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
|
-- @param #number Formation Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
|
||||||
-- @return #EASYGCICAP self
|
-- @return #EASYGCICAP self
|
||||||
function EASYGCICAP:SetCAPFormation(Formation)
|
function EASYGCICAP:SetCAPFormation(Formation)
|
||||||
|
self:T(self.lid.."SetCAPFormation")
|
||||||
self.CapFormation = Formation
|
self.CapFormation = Formation
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -428,7 +429,7 @@ end
|
|||||||
--- Set default number of airframes standing by for intercept tasks (visible on the airfield)
|
--- Set default number of airframes standing by for intercept tasks (visible on the airfield)
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #number Airframes defaults to 2
|
-- @param #number Airframes defaults to 2
|
||||||
-- @return #EASYGCICAP selfAirframes
|
-- @return #EASYGCICAP self
|
||||||
function EASYGCICAP:SetDefaultNumberAlter5Standby(Airframes)
|
function EASYGCICAP:SetDefaultNumberAlter5Standby(Airframes)
|
||||||
self:T(self.lid.."SetDefaultNumberAlter5Standby")
|
self:T(self.lid.."SetDefaultNumberAlter5Standby")
|
||||||
self.noaltert5 = math.abs(Airframes) or 2
|
self.noaltert5 = math.abs(Airframes) or 2
|
||||||
@ -438,13 +439,25 @@ end
|
|||||||
--- Set default engage range for intruders detected by CAP flights in NM.
|
--- Set default engage range for intruders detected by CAP flights in NM.
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #number Range defaults to 50NM
|
-- @param #number Range defaults to 50NM
|
||||||
-- @return #EASYGCICAP selfAirframes
|
-- @return #EASYGCICAP self
|
||||||
function EASYGCICAP:SetDefaultEngageRange(Range)
|
function EASYGCICAP:SetDefaultEngageRange(Range)
|
||||||
self:T(self.lid.."SetDefaultNumberAlter5Standby")
|
self:T(self.lid.."SetDefaultNumberAlter5Standby")
|
||||||
self.engagerange = Range or 50
|
self.engagerange = Range or 50
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set default overhead for intercept calculations
|
||||||
|
-- @param #EASYGCICAP self
|
||||||
|
-- @param #number Overhead The overhead to use.
|
||||||
|
-- @return #EASYGCICAP self
|
||||||
|
-- @usage Either a CAP Plane or a newly spawned GCI plane will take care of intruders. Standard overhead is 0.75, i.e. a group of 3 intrudes will
|
||||||
|
-- be managed by 2 planes from the assigned AirWing. There is an maximum missions limitation per AirWing, so we do not spam the skies.
|
||||||
|
function EASYGCICAP:SetDefaultOverhead(Overhead)
|
||||||
|
self:T(self.lid.."SetDefaultOverhead")
|
||||||
|
self.overhead = Overhead or 0.75
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Add an AirWing to the manager
|
--- Add an AirWing to the manager
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #string Airbasename
|
-- @param #string Airbasename
|
||||||
@ -491,7 +504,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
|
|
||||||
-- Create Airwing
|
-- Create Airwing
|
||||||
local CAP_Wing = AIRWING:New(Airbasename,Alias)
|
local CAP_Wing = AIRWING:New(Airbasename,Alias)
|
||||||
CAP_Wing:SetVerbosityLevel(3)
|
CAP_Wing:SetVerbosityLevel(0)
|
||||||
CAP_Wing:SetReportOff()
|
CAP_Wing:SetReportOff()
|
||||||
CAP_Wing:SetMarker(false)
|
CAP_Wing:SetMarker(false)
|
||||||
CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename))
|
CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename))
|
||||||
@ -528,6 +541,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
flightgroup:SetDespawnAfterHolding()
|
flightgroup:SetDespawnAfterHolding()
|
||||||
flightgroup:SetDestinationbase(AIRBASE:FindByName(Airbasename))
|
flightgroup:SetDestinationbase(AIRBASE:FindByName(Airbasename))
|
||||||
flightgroup:GetGroup():CommandEPLRS(true,5)
|
flightgroup:GetGroup():CommandEPLRS(true,5)
|
||||||
|
flightgroup:GetGroup():SetOptionRadarUsingForContinousSearch()
|
||||||
if Mission.type ~= AUFTRAG.Type.TANKER and Mission.type ~= AUFTRAG.Type.AWACS and Mission.type ~= AUFTRAG.Type.RECON then
|
if Mission.type ~= AUFTRAG.Type.TANKER and Mission.type ~= AUFTRAG.Type.AWACS and Mission.type ~= AUFTRAG.Type.RECON then
|
||||||
flightgroup:SetDetection(true)
|
flightgroup:SetDetection(true)
|
||||||
flightgroup:SetEngageDetectedOn(self.engagerange,{"Air"},self.GoZoneSet,self.NoGoZoneSet)
|
flightgroup:SetEngageDetectedOn(self.engagerange,{"Air"},self.GoZoneSet,self.NoGoZoneSet)
|
||||||
@ -548,7 +562,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
flightgroup:SetFuelLowRTB(true)
|
flightgroup:SetFuelLowRTB(true)
|
||||||
Intel:AddAgent(flightgroup)
|
Intel:AddAgent(flightgroup)
|
||||||
function flightgroup:OnAfterHolding(From,Event,To)
|
function flightgroup:OnAfterHolding(From,Event,To)
|
||||||
self:ClearToLand(5)
|
self:Despawn(1,true)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -1045,31 +1059,61 @@ function EASYGCICAP:AddRejectZone(Zone)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- (Internal) Start detection.
|
--- (Internal) Try to assign the intercept to a FlightGroup already in air and ready.
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @return #EASYGCICAP self
|
-- @param #table ReadyFlightGroups ReadyFlightGroups
|
||||||
function EASYGCICAP:_StartIntel()
|
-- @param Ops.Auftrag#AUFTRAG InterceptAuftrag The Auftrag
|
||||||
self:T(self.lid.."_StartIntel")
|
-- @param Wrapper.Group#GROUP Group The Target
|
||||||
-- Border GCI Detection
|
-- @param #number WingSize Calculated number of Flights
|
||||||
local BlueAir_DetectionSetGroup = SET_GROUP:New()
|
-- @return #boolean assigned
|
||||||
BlueAir_DetectionSetGroup:FilterPrefixes( { self.EWRName } )
|
-- @return #number leftover
|
||||||
BlueAir_DetectionSetGroup:FilterStart()
|
function EASYGCICAP:_TryAssignIntercept(ReadyFlightGroups,InterceptAuftrag,Group,WingSize)
|
||||||
|
self:I("_TryAssignIntercept for size "..WingSize or 1)
|
||||||
-- Intel type detection
|
local assigned = false
|
||||||
local BlueIntel = INTEL:New(BlueAir_DetectionSetGroup,self.coalitionname, self.EWRName)
|
local wingsize = WingSize or 1
|
||||||
BlueIntel:SetClusterAnalysis(true,false,false)
|
local mindist = 0
|
||||||
BlueIntel:SetForgetTime(300)
|
local disttable = {}
|
||||||
BlueIntel:SetAcceptZones(self.GoZoneSet)
|
if Group and Group:IsAlive() then
|
||||||
BlueIntel:SetRejectZones(self.NoGoZoneSet)
|
local gcoord = Group:GetCoordinate() or COORDINATE:New(0,0,0)
|
||||||
BlueIntel:SetVerbosity(0)
|
self:I(self.lid..string.format("Assignment for %s",Group:GetName()))
|
||||||
BlueIntel:Start()
|
for _name,_FG in pairs(ReadyFlightGroups or {}) do
|
||||||
|
local FG = _FG -- Ops.FlightGroup#FLIGHTGROUP
|
||||||
if self.debug then
|
local fcoord = FG:GetCoordinate()
|
||||||
BlueIntel.debug = true
|
local dist = math.floor(UTILS.Round(fcoord:Get2DDistance(gcoord)/1000,1))
|
||||||
|
self:I(self.lid..string.format("FG %s Distance %dkm",_name,dist))
|
||||||
|
disttable[#disttable+1] = { FG=FG, dist=dist}
|
||||||
|
if dist>mindist then mindist=dist end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Here, we'll decide if we need to launch an intercepting flight, and from where
|
local function sortDistance(a, b)
|
||||||
|
return a.dist < b.dist
|
||||||
|
end
|
||||||
|
|
||||||
|
table.sort(disttable, sortDistance)
|
||||||
|
|
||||||
|
for _,_entry in ipairs(disttable) do
|
||||||
|
local FG = _entry.FG -- Ops.FlightGroup#FLIGHTGROUP
|
||||||
|
FG:AddMission(InterceptAuftrag)
|
||||||
|
local cm = FG:GetMissionCurrent()
|
||||||
|
if cm then cm:Cancel() end
|
||||||
|
wingsize = wingsize - 1
|
||||||
|
self:I(self.lid..string.format("Assigned to FG %s Distance %dkm",FG:GetName(),_entry.dist))
|
||||||
|
if wingsize == 0 then
|
||||||
|
assigned = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return assigned, wingsize
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Add a zone to the rejected zones set.
|
||||||
|
-- @param #EASYGCICAP self
|
||||||
|
-- @param Ops.Intelligence#INTEL.Cluster Cluster
|
||||||
|
-- @return #EASYGCICAP self
|
||||||
|
function EASYGCICAP:_AssignIntercept(Cluster)
|
||||||
|
-- Here, we'll decide if we need to launch an intercepting flight, and from where
|
||||||
local overhead = self.overhead
|
local overhead = self.overhead
|
||||||
local capspeed = self.capspeed + 100
|
local capspeed = self.capspeed + 100
|
||||||
local capalt = self.capalt
|
local capalt = self.capalt
|
||||||
@ -1080,20 +1124,20 @@ function EASYGCICAP:_StartIntel()
|
|||||||
local ctlpts = self.ManagedCP
|
local ctlpts = self.ManagedCP
|
||||||
local MaxAliveMissions = self.MaxAliveMissions * self.capgrouping
|
local MaxAliveMissions = self.MaxAliveMissions * self.capgrouping
|
||||||
local nogozoneset = self.NoGoZoneSet
|
local nogozoneset = self.NoGoZoneSet
|
||||||
|
local ReadyFlightGroups = self.ReadyFlightGroups
|
||||||
|
|
||||||
function BlueIntel:OnAfterNewCluster(From,Event,To,Cluster)
|
|
||||||
-- Aircraft?
|
-- Aircraft?
|
||||||
if Cluster.ctype ~= INTEL.Ctype.AIRCRAFT then return end
|
if Cluster.ctype ~= INTEL.Ctype.AIRCRAFT then return end
|
||||||
-- Threatlevel 0..10
|
-- Threatlevel 0..10
|
||||||
local contact = self:GetHighestThreatContact(Cluster)
|
local contact = self.Intel:GetHighestThreatContact(Cluster)
|
||||||
local name = contact.groupname --#string
|
local name = contact.groupname --#string
|
||||||
local threat = contact.threatlevel --#number
|
local threat = contact.threatlevel --#number
|
||||||
local position = self:CalcClusterFuturePosition(Cluster,300)
|
local position = self.Intel:CalcClusterFuturePosition(Cluster,300)
|
||||||
-- calculate closest zone
|
-- calculate closest zone
|
||||||
local bestdistance = 2000*1000 -- 2000km
|
local bestdistance = 2000*1000 -- 2000km
|
||||||
local targetairwing = nil -- Ops.AirWing#AIRWING
|
local targetairwing = nil -- Ops.AirWing#AIRWING
|
||||||
local targetawname = "" -- #string
|
local targetawname = "" -- #string
|
||||||
local clustersize = self:ClusterCountUnits(Cluster) or 1
|
local clustersize = self.Intel:ClusterCountUnits(Cluster) or 1
|
||||||
local wingsize = math.abs(overhead * (clustersize+1))
|
local wingsize = math.abs(overhead * (clustersize+1))
|
||||||
if wingsize > maxsize then wingsize = maxsize end
|
if wingsize > maxsize then wingsize = maxsize end
|
||||||
-- existing mission, and if so - done?
|
-- existing mission, and if so - done?
|
||||||
@ -1140,20 +1184,6 @@ function EASYGCICAP:_StartIntel()
|
|||||||
-- Do we have a matching airwing?
|
-- Do we have a matching airwing?
|
||||||
if targetairwing then
|
if targetairwing then
|
||||||
local AssetCount = targetairwing:CountAssetsOnMission(MissionTypes,Cohort)
|
local AssetCount = targetairwing:CountAssetsOnMission(MissionTypes,Cohort)
|
||||||
--[[
|
|
||||||
local Assets = targetairwing:GetAssetsOnMission(AUFTRAG.Type.GCICAP)
|
|
||||||
for _,_asset in pairs(Assets) do
|
|
||||||
local asset = _asset -- Functional.Warehouse#WAREHOUSE.Assetitem
|
|
||||||
local fg = asset.flightgroup
|
|
||||||
local name = asset.spawngroupname
|
|
||||||
local mission = fg:GetMissionCurrent()
|
|
||||||
local mtype = mission.type
|
|
||||||
local distance = position:Get3DDistance(fg:GetCoordinate()) or 1000*1000
|
|
||||||
distance = distance / 1000
|
|
||||||
local text = string.format("FlightGroup %s on mission %s with distance %d km",name,mtype,distance)
|
|
||||||
local m = MESSAGE:New(text,15,"GCICAP"):ToAllIf(self.debug):ToLog()
|
|
||||||
end
|
|
||||||
--]]
|
|
||||||
-- Enough airframes on mission already?
|
-- Enough airframes on mission already?
|
||||||
self:T(self.lid.." Assets on Mission "..AssetCount)
|
self:T(self.lid.." Assets on Mission "..AssetCount)
|
||||||
if AssetCount <= MaxAliveMissions then
|
if AssetCount <= MaxAliveMissions then
|
||||||
@ -1161,7 +1191,7 @@ function EASYGCICAP:_StartIntel()
|
|||||||
local InterceptAuftrag = AUFTRAG:NewINTERCEPT(contact.group)
|
local InterceptAuftrag = AUFTRAG:NewINTERCEPT(contact.group)
|
||||||
:SetMissionRange(150)
|
:SetMissionRange(150)
|
||||||
:SetPriority(1,true,1)
|
:SetPriority(1,true,1)
|
||||||
:SetRequiredAssets(wingsize)
|
--:SetRequiredAssets(wingsize)
|
||||||
:SetRepeatOnFailure(repeats)
|
:SetRepeatOnFailure(repeats)
|
||||||
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
||||||
:SetMissionAltitude(capalt)
|
:SetMissionAltitude(capalt)
|
||||||
@ -1182,8 +1212,11 @@ function EASYGCICAP:_StartIntel()
|
|||||||
nogozoneset
|
nogozoneset
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
local assigned, rest = self:_TryAssignIntercept(ReadyFlightGroups,InterceptAuftrag,contact.group,wingsize)
|
||||||
|
if not assigned then
|
||||||
|
InterceptAuftrag:SetRequiredAssets(rest)
|
||||||
targetairwing:AddMission(InterceptAuftrag)
|
targetairwing:AddMission(InterceptAuftrag)
|
||||||
|
end
|
||||||
Cluster.mission = InterceptAuftrag
|
Cluster.mission = InterceptAuftrag
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1191,6 +1224,38 @@ function EASYGCICAP:_StartIntel()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- (Internal) Start detection.
|
||||||
|
-- @param #EASYGCICAP self
|
||||||
|
-- @return #EASYGCICAP self
|
||||||
|
function EASYGCICAP:_StartIntel()
|
||||||
|
self:T(self.lid.."_StartIntel")
|
||||||
|
-- Border GCI Detection
|
||||||
|
local BlueAir_DetectionSetGroup = SET_GROUP:New()
|
||||||
|
BlueAir_DetectionSetGroup:FilterPrefixes( { self.EWRName } )
|
||||||
|
BlueAir_DetectionSetGroup:FilterStart()
|
||||||
|
|
||||||
|
-- Intel type detection
|
||||||
|
local BlueIntel = INTEL:New(BlueAir_DetectionSetGroup,self.coalitionname, self.EWRName)
|
||||||
|
BlueIntel:SetClusterAnalysis(true,false,false)
|
||||||
|
BlueIntel:SetForgetTime(300)
|
||||||
|
BlueIntel:SetAcceptZones(self.GoZoneSet)
|
||||||
|
BlueIntel:SetRejectZones(self.NoGoZoneSet)
|
||||||
|
BlueIntel:SetVerbosity(0)
|
||||||
|
BlueIntel:Start()
|
||||||
|
|
||||||
|
if self.debug then
|
||||||
|
BlueIntel.debug = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function AssignCluster(Cluster)
|
||||||
|
self:_AssignIntercept(Cluster)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BlueIntel:OnAfterNewCluster(From,Event,To,Cluster)
|
||||||
|
AssignCluster(Cluster)
|
||||||
|
end
|
||||||
|
|
||||||
self.Intel = BlueIntel
|
self.Intel = BlueIntel
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -1266,6 +1331,24 @@ function EASYGCICAP:onafterStatus(From,Event,To)
|
|||||||
tankermission = tankermission + _wing[1]:CountMissionsInQueue({AUFTRAG.Type.TANKER})
|
tankermission = tankermission + _wing[1]:CountMissionsInQueue({AUFTRAG.Type.TANKER})
|
||||||
assets = assets + count
|
assets = assets + count
|
||||||
instock = instock + count2
|
instock = instock + count2
|
||||||
|
local assetsonmission = _wing[1]:GetAssetsOnMission({AUFTRAG.Type.GCICAP,AUFTRAG.Type.PATROLRACETRACK})
|
||||||
|
-- update ready groups
|
||||||
|
self.ReadyFlightGroups = nil
|
||||||
|
self.ReadyFlightGroups = {}
|
||||||
|
for _,_asset in pairs(assetsonmission or {}) do
|
||||||
|
local asset = _asset -- Functional.Warehouse#WAREHOUSE.Assetitem
|
||||||
|
local FG = asset.flightgroup -- Ops.FlightGroup#FLIGHTGROUP
|
||||||
|
if FG then
|
||||||
|
local name = FG:GetName()
|
||||||
|
local engage = FG:IsEngaging()
|
||||||
|
local hasmissiles = FG:IsOutOfMissiles() == nil and true or false
|
||||||
|
local ready = hasmissiles and FG:IsFuelGood() and FG:IsAirborne()
|
||||||
|
--self:I(string.format("Flightgroup %s Engaging = %s Ready = %s",tostring(name),tostring(engage),tostring(ready)))
|
||||||
|
if ready then
|
||||||
|
self.ReadyFlightGroups[name] = FG
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if self.Monitor then
|
if self.Monitor then
|
||||||
local threatcount = #self.Intel.Clusters or 0
|
local threatcount = #self.Intel.Clusters or 0
|
||||||
|
|||||||
@ -7180,7 +7180,7 @@ function OPSGROUP:SetLaserTarget(Target)
|
|||||||
|
|
||||||
-- Scenery as target. Treat it like a coordinate. Set offset to 1 meter above ground.
|
-- Scenery as target. Treat it like a coordinate. Set offset to 1 meter above ground.
|
||||||
self.spot.TargetType=0
|
self.spot.TargetType=0
|
||||||
self.spot.offsetTarget={x=0, y=1, z=0}
|
self.spot.offsetTarget={x=0, y=3, z=0}
|
||||||
|
|
||||||
elseif Target:IsInstanceOf("POSITIONABLE") then
|
elseif Target:IsInstanceOf("POSITIONABLE") then
|
||||||
|
|
||||||
|
|||||||
@ -1495,11 +1495,11 @@ end
|
|||||||
-- @return #PLAYERRECCE self
|
-- @return #PLAYERRECCE self
|
||||||
function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
|
function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
|
||||||
self:T(self.lid.."SetSRS")
|
self:T(self.lid.."SetSRS")
|
||||||
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" --
|
self.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone" --
|
||||||
self.Gender = Gender or "male" --
|
self.Gender = Gender or MSRS.gender or "male" --
|
||||||
self.Culture = Culture or "en-US" --
|
self.Culture = Culture or MSRS.culture or "en-US" --
|
||||||
self.Port = Port or 5002 --
|
self.Port = Port or MSRS.port or 5002 --
|
||||||
self.Voice = Voice --
|
self.Voice = Voice or MSRS.voice --
|
||||||
self.PathToGoogleKey = PathToGoogleKey --
|
self.PathToGoogleKey = PathToGoogleKey --
|
||||||
self.Volume = Volume or 1.0 --
|
self.Volume = Volume or 1.0 --
|
||||||
self.UseSRS = true
|
self.UseSRS = true
|
||||||
@ -1514,17 +1514,17 @@ function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,V
|
|||||||
self.SRS:SetGender(self.Gender)
|
self.SRS:SetGender(self.Gender)
|
||||||
self.SRS:SetCulture(self.Culture)
|
self.SRS:SetCulture(self.Culture)
|
||||||
self.SRS:SetPort(self.Port)
|
self.SRS:SetPort(self.Port)
|
||||||
self.SRS:SetVoice(self.Voice)
|
|
||||||
self.SRS:SetVolume(self.Volume)
|
self.SRS:SetVolume(self.Volume)
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
self.SRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.PathToGoogleKey)
|
self.SRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.PathToGoogleKey)
|
||||||
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
|
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
|
||||||
end
|
end
|
||||||
-- Pre-configured Google?
|
-- Pre-configured Google?
|
||||||
if (not PathToGoogleKey) and self.AwacsSRS:GetProvider() == MSRS.Provider.GOOGLE then
|
if (not PathToGoogleKey) and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
|
||||||
self.PathToGoogleKey = MSRS.poptions.gcloud.credentials
|
self.PathToGoogleKey = MSRS.poptions.gcloud.credentials
|
||||||
self.Voice = Voice or MSRS.poptions.gcloud.voice
|
self.Voice = Voice or MSRS.poptions.gcloud.voice
|
||||||
end
|
end
|
||||||
|
self.SRS:SetVoice(self.Voice)
|
||||||
self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name)
|
self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name)
|
||||||
self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
|
self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
|
||||||
return self
|
return self
|
||||||
|
|||||||
@ -98,7 +98,7 @@ PLAYERTASK = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASK.version="0.1.22"
|
PLAYERTASK.version="0.1.23"
|
||||||
|
|
||||||
--- Generic task condition.
|
--- Generic task condition.
|
||||||
-- @type PLAYERTASK.Condition
|
-- @type PLAYERTASK.Condition
|
||||||
@ -1965,6 +1965,7 @@ end
|
|||||||
-- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only).
|
-- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only).
|
||||||
-- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop.
|
-- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop.
|
||||||
-- @param #number LaserCode The lasercode to be used. Defaults to 1688.
|
-- @param #number LaserCode The lasercode to be used. Defaults to 1688.
|
||||||
|
-- @param Core.Point#COORDINATE HoldingPoint (Optional) Point where the drone should initially circle. If not set, defaults to BullsEye of the coalition.
|
||||||
-- @return #PLAYERTASKCONTROLLER self
|
-- @return #PLAYERTASKCONTROLLER self
|
||||||
-- @usage
|
-- @usage
|
||||||
-- -- Set up precision bombing, FlightGroup as lasing unit
|
-- -- Set up precision bombing, FlightGroup as lasing unit
|
||||||
@ -1979,7 +1980,7 @@ end
|
|||||||
-- ArmyGroup:Activate()
|
-- ArmyGroup:Activate()
|
||||||
-- taskmanager:EnablePrecisionBombing(ArmyGroup,1688)
|
-- taskmanager:EnablePrecisionBombing(ArmyGroup,1688)
|
||||||
--
|
--
|
||||||
function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode)
|
function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode,HoldingPoint)
|
||||||
self:T(self.lid.."EnablePrecisionBombing")
|
self:T(self.lid.."EnablePrecisionBombing")
|
||||||
if FlightGroup then
|
if FlightGroup then
|
||||||
if FlightGroup.ClassName and (FlightGroup.ClassName == "FLIGHTGROUP" or FlightGroup.ClassName == "ARMYGROUP")then
|
if FlightGroup.ClassName and (FlightGroup.ClassName == "FLIGHTGROUP" or FlightGroup.ClassName == "ARMYGROUP")then
|
||||||
@ -1995,6 +1996,7 @@ function PLAYERTASKCONTROLLER:EnablePrecisionBombing(FlightGroup,LaserCode)
|
|||||||
-- let it orbit the BullsEye if FG
|
-- let it orbit the BullsEye if FG
|
||||||
if self.LasingDrone:IsFlightgroup() then
|
if self.LasingDrone:IsFlightgroup() then
|
||||||
local BullsCoordinate = COORDINATE:NewFromVec3( coalition.getMainRefPoint( self.Coalition ))
|
local BullsCoordinate = COORDINATE:NewFromVec3( coalition.getMainRefPoint( self.Coalition ))
|
||||||
|
if HoldingPoint then BullsCoordinate = HoldingPoint end
|
||||||
local Orbit = AUFTRAG:NewORBIT_CIRCLE(BullsCoordinate,10000,120)
|
local Orbit = AUFTRAG:NewORBIT_CIRCLE(BullsCoordinate,10000,120)
|
||||||
self.LasingDrone:AddMission(Orbit)
|
self.LasingDrone:AddMission(Orbit)
|
||||||
end
|
end
|
||||||
@ -2553,10 +2555,11 @@ function PLAYERTASKCONTROLLER:_CheckPrecisionTasks()
|
|||||||
self.LasingDrone.playertask.reachmessage = false
|
self.LasingDrone.playertask.reachmessage = false
|
||||||
-- move the drone to target
|
-- move the drone to target
|
||||||
if self.LasingDrone:IsFlightgroup() then
|
if self.LasingDrone:IsFlightgroup() then
|
||||||
|
self.LasingDrone:CancelAllMissions()
|
||||||
local auftrag = AUFTRAG:NewORBIT_CIRCLE(task.Target:GetCoordinate(),10000,120)
|
local auftrag = AUFTRAG:NewORBIT_CIRCLE(task.Target:GetCoordinate(),10000,120)
|
||||||
local currmission = self.LasingDrone:GetMissionCurrent()
|
--local currmission = self.LasingDrone:GetMissionCurrent()
|
||||||
self.LasingDrone:AddMission(auftrag)
|
self.LasingDrone:AddMission(auftrag)
|
||||||
currmission:__Cancel(-2)
|
--currmission:__Cancel(-2)
|
||||||
elseif self.LasingDrone:IsArmygroup() then
|
elseif self.LasingDrone:IsArmygroup() then
|
||||||
local tgtcoord = task.Target:GetCoordinate()
|
local tgtcoord = task.Target:GetCoordinate()
|
||||||
local tgtzone = ZONE_RADIUS:New("ArmyGroup-"..math.random(1,10000),tgtcoord:GetVec2(),3000)
|
local tgtzone = ZONE_RADIUS:New("ArmyGroup-"..math.random(1,10000),tgtcoord:GetVec2(),3000)
|
||||||
@ -2606,6 +2609,7 @@ function PLAYERTASKCONTROLLER:_CheckPrecisionTasks()
|
|||||||
-- not done yet
|
-- not done yet
|
||||||
local dcoord = self.LasingDrone:GetCoordinate()
|
local dcoord = self.LasingDrone:GetCoordinate()
|
||||||
local tcoord = task.Target:GetCoordinate()
|
local tcoord = task.Target:GetCoordinate()
|
||||||
|
tcoord.y = tcoord.y + 2
|
||||||
local dist = dcoord:Get2DDistance(tcoord)
|
local dist = dcoord:Get2DDistance(tcoord)
|
||||||
-- close enough?
|
-- close enough?
|
||||||
if dist < 3000 and not self.LasingDrone:IsLasing() then
|
if dist < 3000 and not self.LasingDrone:IsLasing() then
|
||||||
@ -3189,7 +3193,7 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
|
|||||||
local islasing = self.LasingDrone:IsLasing() == true and yes or no
|
local islasing = self.LasingDrone:IsLasing() == true and yes or no
|
||||||
local prectext = self.gettext:GetEntry("POINTERTARGETREPORT",self.locale)
|
local prectext = self.gettext:GetEntry("POINTERTARGETREPORT",self.locale)
|
||||||
prectext = string.format(prectext,inreach,islasing)
|
prectext = string.format(prectext,inreach,islasing)
|
||||||
text = text .. prectext
|
text = text .. prectext.."("..self.LaserCode..")"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Buddylasing
|
-- Buddylasing
|
||||||
|
|||||||
@ -265,19 +265,47 @@ MSRS.version="0.3.0"
|
|||||||
--- Voices
|
--- Voices
|
||||||
-- @type MSRS.Voices
|
-- @type MSRS.Voices
|
||||||
MSRS.Voices = {
|
MSRS.Voices = {
|
||||||
Microsoft = {
|
Microsoft = { -- working ones if not using gRPC and MS
|
||||||
["Hedda"] = "Microsoft Hedda Desktop", -- de-DE
|
["Hedda"] = "Microsoft Hedda Desktop", -- de-DE
|
||||||
["Hazel"] = "Microsoft Hazel Desktop", -- en-GB
|
["Hazel"] = "Microsoft Hazel Desktop", -- en-GB
|
||||||
["David"] = "Microsoft David Desktop", -- en-US
|
["David"] = "Microsoft David Desktop", -- en-US
|
||||||
["Zira"] = "Microsoft Zira Desktop", -- en-US
|
["Zira"] = "Microsoft Zira Desktop", -- en-US
|
||||||
["Hortense"] = "Microsoft Hortense Desktop", --fr-FR
|
["Hortense"] = "Microsoft Hortense Desktop", --fr-FR
|
||||||
|
["de-DE-Hedda"] = "Microsoft Hedda Desktop", -- de-DE
|
||||||
|
["en-GB-Hazel"] = "Microsoft Hazel Desktop", -- en-GB
|
||||||
|
["en-US-David"] = "Microsoft David Desktop", -- en-US
|
||||||
|
["en-US-Zira"] = "Microsoft Zira Desktop", -- en-US
|
||||||
|
["fr-FR-Hortense"] = "Microsoft Hortense Desktop", --fr-FR
|
||||||
},
|
},
|
||||||
MicrosoftGRPC = {
|
MicrosoftGRPC = { -- en-US/GB voices only as of Jan 2024, working ones if using gRPC and MS, if voice packs are installed
|
||||||
["Hedda"] = "Hedda", -- de-DE
|
--["Hedda"] = "Hedda", -- de-DE
|
||||||
["Hazel"] = "Hazel", -- en-GB
|
["Hazel"] = "Hazel", -- en-GB
|
||||||
|
["George"] = "George", -- en-GB
|
||||||
|
["Susan"] = "Susan", -- en-GB
|
||||||
["David"] = "David", -- en-US
|
["David"] = "David", -- en-US
|
||||||
["Zira"] = "Zira", -- en-US
|
["Zira"] = "Zira", -- en-US
|
||||||
["Hortense"] = "Hortense", --fr-FR
|
["Mark"] = "Mark", -- en-US
|
||||||
|
["James"] = "James", --en-AU
|
||||||
|
["Catherine"] = "Catherine", --en-AU
|
||||||
|
["Richard"] = "Richard", --en-CA
|
||||||
|
["Linda"] = "Linda", --en-CA
|
||||||
|
["Ravi"] = "Ravi", --en-IN
|
||||||
|
["Heera"] = "Heera", --en-IN
|
||||||
|
["Sean"] = "Sean", --en-IR
|
||||||
|
["en_GB_Hazel"] = "Hazel", -- en-GB
|
||||||
|
["en_GB_George"] = "George", -- en-GB
|
||||||
|
["en_GB_Susan"] = "Susan", -- en-GB
|
||||||
|
["en_US_David"] = "David", -- en-US
|
||||||
|
["en_US_Zira"] = "Zira", -- en-US
|
||||||
|
["en_US_Mark"] = "Mark", -- en-US
|
||||||
|
["en_AU_James"] = "James", --en-AU
|
||||||
|
["en_AU_Catherine"] = "Catherine", --en-AU
|
||||||
|
["en_CA_Richard"] = "Richard", --en-CA
|
||||||
|
["en_CA_Linda"] = "Linda", --en-CA
|
||||||
|
["en_IN_Ravi"] = "Ravi", --en-IN
|
||||||
|
["en_IN_Heera"] = "Heera", --en-IN
|
||||||
|
["en_IR_Sean"] = "Sean", --en-IR
|
||||||
|
--]]
|
||||||
},
|
},
|
||||||
Google = {
|
Google = {
|
||||||
Standard = {
|
Standard = {
|
||||||
|
|||||||
@ -2271,19 +2271,36 @@ function UTILS.GenerateVHFrequencies()
|
|||||||
return FreeVHFFrequencies
|
return FreeVHFFrequencies
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Function to generate valid UHF Frequencies in mHz (AM).
|
--- Function to generate valid UHF Frequencies in mHz (AM). Can be between 220 and 399 mHz. 243 is auto-excluded.
|
||||||
|
-- @param Start (Optional) Avoid frequencies between Start and End in mHz, e.g. 244
|
||||||
|
-- @param End (Optional) Avoid frequencies between Start and End in mHz, e.g. 320
|
||||||
-- @return #table UHF Frequencies
|
-- @return #table UHF Frequencies
|
||||||
function UTILS.GenerateUHFrequencies()
|
function UTILS.GenerateUHFrequencies(Start,End)
|
||||||
|
|
||||||
local FreeUHFFrequencies = {}
|
local FreeUHFFrequencies = {}
|
||||||
local _start = 220000000
|
local _start = 220000000
|
||||||
|
|
||||||
|
if not Start then
|
||||||
while _start < 399000000 do
|
while _start < 399000000 do
|
||||||
if _start ~= 243000000 then
|
if _start ~= 243000000 then
|
||||||
table.insert(FreeUHFFrequencies, _start)
|
table.insert(FreeUHFFrequencies, _start)
|
||||||
end
|
end
|
||||||
_start = _start + 500000
|
_start = _start + 500000
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
local myend = End*1000000 or 399000000
|
||||||
|
local mystart = Start*1000000 or 220000000
|
||||||
|
|
||||||
|
while _start < 399000000 do
|
||||||
|
if _start ~= 243000000 and (_start < mystart or _start > myend) then
|
||||||
|
print(_start)
|
||||||
|
table.insert(FreeUHFFrequencies, _start)
|
||||||
|
end
|
||||||
|
_start = _start + 500000
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return FreeUHFFrequencies
|
return FreeUHFFrequencies
|
||||||
end
|
end
|
||||||
|
|||||||
@ -4018,6 +4018,62 @@ function CONTROLLABLE:OptionEngageRange( EngageRange )
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- [AIR] Set how the AI uses the onboard radar.
|
||||||
|
-- @param #CONTROLLABLE self
|
||||||
|
-- @param #number Option Options are: `NEVER = 0, FOR_ATTACK_ONLY = 1,FOR_SEARCH_IF_REQUIRED = 2, FOR_CONTINUOUS_SEARCH = 3`
|
||||||
|
-- @return #CONTROLLABLE self
|
||||||
|
function CONTROLLABLE:SetOptionRadarUsing(Option)
|
||||||
|
self:F2( { self.ControllableName } )
|
||||||
|
if self:IsAir() then
|
||||||
|
self:SetOption(AI.Option.Air.id.RADAR_USING,Option)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [AIR] Set how the AI uses the onboard radar. Here: never.
|
||||||
|
-- @param #CONTROLLABLE self
|
||||||
|
-- @return #CONTROLLABLE self
|
||||||
|
function CONTROLLABLE:SetOptionRadarUsingNever()
|
||||||
|
self:F2( { self.ControllableName } )
|
||||||
|
if self:IsAir() then
|
||||||
|
self:SetOption(AI.Option.Air.id.RADAR_USING,0)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [AIR] Set how the AI uses the onboard radar, here: for attack only.
|
||||||
|
-- @param #CONTROLLABLE self
|
||||||
|
-- @return #CONTROLLABLE self
|
||||||
|
function CONTROLLABLE:SetOptionRadarUsingForAttackOnly()
|
||||||
|
self:F2( { self.ControllableName } )
|
||||||
|
if self:IsAir() then
|
||||||
|
self:SetOption(AI.Option.Air.id.RADAR_USING,1)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [AIR] Set how the AI uses the onboard radar, here: when required for searching.
|
||||||
|
-- @param #CONTROLLABLE self
|
||||||
|
-- @return #CONTROLLABLE self
|
||||||
|
function CONTROLLABLE:SetOptionRadarUsingForSearchIfRequired()
|
||||||
|
self:F2( { self.ControllableName } )
|
||||||
|
if self:IsAir() then
|
||||||
|
self:SetOption(AI.Option.Air.id.RADAR_USING,2)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- [AIR] Set how the AI uses the onboard radar, here: always on.
|
||||||
|
-- @param #CONTROLLABLE self
|
||||||
|
-- @return #CONTROLLABLE self
|
||||||
|
function CONTROLLABLE:SetOptionRadarUsingForContinousSearch()
|
||||||
|
self:F2( { self.ControllableName } )
|
||||||
|
if self:IsAir() then
|
||||||
|
self:SetOption(AI.Option.Air.id.RADAR_USING,3)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- (GROUND) Relocate controllable to a random point within a given radius; use e.g.for evasive actions; Note that not all ground controllables can actually drive, also the alarm state of the controllable might stop it from moving.
|
--- (GROUND) Relocate controllable to a random point within a given radius; use e.g.for evasive actions; Note that not all ground controllables can actually drive, also the alarm state of the controllable might stop it from moving.
|
||||||
-- @param #CONTROLLABLE self
|
-- @param #CONTROLLABLE self
|
||||||
-- @param #number speed Speed of the controllable, default 20
|
-- @param #number speed Speed of the controllable, default 20
|
||||||
|
|||||||
@ -18,5 +18,7 @@ __Moose.Include = function( IncludeFile )
|
|||||||
end
|
end
|
||||||
|
|
||||||
__Moose.Includes = {}
|
__Moose.Includes = {}
|
||||||
|
if not MOOSE_DEVELOPMENT_FOLDER then
|
||||||
__Moose.Include( 'Scripts/Moose/Modules.lua' )
|
MOOSE_DEVELOPMENT_FOLDER='Scripts'
|
||||||
|
end
|
||||||
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua' )
|
||||||
|
|||||||
@ -3,7 +3,11 @@
|
|||||||
-- Try to load Moose as individual script files from <DcsInstallDir\Script\Moose
|
-- Try to load Moose as individual script files from <DcsInstallDir\Script\Moose
|
||||||
-- which should be a Junction link to the MOOSE repository subfolder "Moose Development\Moose".
|
-- which should be a Junction link to the MOOSE repository subfolder "Moose Development\Moose".
|
||||||
-- This method is used by Moose developers and not mission builders.
|
-- This method is used by Moose developers and not mission builders.
|
||||||
ModuleLoader = 'Scripts/Moose/Modules.lua'
|
if not MOOSE_DEVELOPMENT_FOLDER then
|
||||||
|
MOOSE_DEVELOPMENT_FOLDER='Scripts'
|
||||||
|
end
|
||||||
|
|
||||||
|
ModuleLoader = MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua'
|
||||||
|
|
||||||
if io then
|
if io then
|
||||||
local f=io.open(ModuleLoader,"r")
|
local f=io.open(ModuleLoader,"r")
|
||||||
@ -31,7 +35,7 @@ if io then
|
|||||||
|
|
||||||
__Moose.Includes = {}
|
__Moose.Includes = {}
|
||||||
|
|
||||||
__Moose.Include( 'Scripts/Moose/Modules.lua' )
|
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Modules.lua' )
|
||||||
BASE:TraceOnOff( true )
|
BASE:TraceOnOff( true )
|
||||||
env.info( '*** MOOSE INCLUDE END *** ' )
|
env.info( '*** MOOSE INCLUDE END *** ' )
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ while( MooseSource ) do
|
|||||||
MooseSource = string.gsub(MooseSource, "\r", "")
|
MooseSource = string.gsub(MooseSource, "\r", "")
|
||||||
|
|
||||||
if MooseSource ~= "" then
|
if MooseSource ~= "" then
|
||||||
MooseSource = string.match( MooseSource, "Scripts/Moose/(.+)'" )
|
MooseSource = string.match( MooseSource, "/Moose/(.+)'" )
|
||||||
local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource
|
local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource
|
||||||
if MooseDynamicStatic == "D" then
|
if MooseDynamicStatic == "D" then
|
||||||
print( "Load dynamic: " .. MooseFilePath )
|
print( "Load dynamic: " .. MooseFilePath )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user