mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixed dead links for Ops.Intel and Ops.Airwing
This commit is contained in:
parent
11c74ddc17
commit
2ca847e845
@ -914,12 +914,12 @@ function AUTOLASE:onafterMonitor(From, Event, To)
|
|||||||
|
|
||||||
self:SetPilotMenu()
|
self:SetPilotMenu()
|
||||||
|
|
||||||
local detecteditems = self.Contacts or {} -- #table of Ops.Intelligence#INTEL.Contact
|
local detecteditems = self.Contacts or {} -- #table of Ops.Intel#INTEL.Contact
|
||||||
local groupsbythreat = {}
|
local groupsbythreat = {}
|
||||||
local report = REPORT:New("Detections")
|
local report = REPORT:New("Detections")
|
||||||
local lines = 0
|
local lines = 0
|
||||||
for _,_contact in pairs(detecteditems) do
|
for _,_contact in pairs(detecteditems) do
|
||||||
local contact = _contact -- Ops.Intelligence#INTEL.Contact
|
local contact = _contact -- Ops.Intel#INTEL.Contact
|
||||||
local grp = contact.group
|
local grp = contact.group
|
||||||
local coord = contact.position
|
local coord = contact.position
|
||||||
local reccename = contact.recce or "none"
|
local reccename = contact.recce or "none"
|
||||||
|
|||||||
@ -1222,10 +1222,10 @@ do
|
|||||||
function MANTIS:_PreFilterHeight(height)
|
function MANTIS:_PreFilterHeight(height)
|
||||||
self:T(self.lid.."_PreFilterHeight")
|
self:T(self.lid.."_PreFilterHeight")
|
||||||
local set = {}
|
local set = {}
|
||||||
local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK
|
local dlink = self.Detection -- Ops.Intel#INTEL_DLINK
|
||||||
local detectedgroups = dlink:GetContactTable()
|
local detectedgroups = dlink:GetContactTable()
|
||||||
for _,_contact in pairs(detectedgroups) do
|
for _,_contact in pairs(detectedgroups) do
|
||||||
local contact = _contact -- Ops.Intelligence#INTEL.Contact
|
local contact = _contact -- Ops.Intel#INTEL.Contact
|
||||||
local grp = contact.group -- Wrapper.Group#GROUP
|
local grp = contact.group -- Wrapper.Group#GROUP
|
||||||
if grp:IsAlive() then
|
if grp:IsAlive() then
|
||||||
if grp:GetHeight(true) < height then
|
if grp:GetHeight(true) < height then
|
||||||
@ -1777,7 +1777,7 @@ do
|
|||||||
-- @return #MANTIS self
|
-- @return #MANTIS self
|
||||||
function MANTIS:_CheckDLinkState()
|
function MANTIS:_CheckDLinkState()
|
||||||
self:T(self.lid .. "_CheckDLinkState")
|
self:T(self.lid .. "_CheckDLinkState")
|
||||||
local dlink = self.Detection -- Ops.Intelligence#INTEL_DLINK
|
local dlink = self.Detection -- Ops.Intel#INTEL_DLINK
|
||||||
local TS = timer.getAbsTime()
|
local TS = timer.getAbsTime()
|
||||||
if not dlink:Is("Running") and (TS - self.DLTimeStamp > 29) then
|
if not dlink:Is("Running") and (TS - self.DLTimeStamp > 29) then
|
||||||
self.DLink = false
|
self.DLink = false
|
||||||
|
|||||||
@ -852,8 +852,8 @@ AWACS.Messages = {
|
|||||||
--- Contact Data
|
--- Contact Data
|
||||||
-- @type AWACS.ManagedContact
|
-- @type AWACS.ManagedContact
|
||||||
-- @field #number CID
|
-- @field #number CID
|
||||||
-- @field Ops.Intelligence#INTEL.Contact Contact
|
-- @field Ops.Intel#INTEL.Contact Contact
|
||||||
-- @field Ops.Intelligence#INTEL.Cluster Cluster
|
-- @field Ops.Intel#INTEL.Cluster Cluster
|
||||||
-- @field #string IFF -- ID'ed or not (yet)
|
-- @field #string IFF -- ID'ed or not (yet)
|
||||||
-- @field Ops.Target#TARGET Target
|
-- @field Ops.Target#TARGET Target
|
||||||
-- @field #number LinkedTask --> TID
|
-- @field #number LinkedTask --> TID
|
||||||
@ -902,8 +902,8 @@ AWACS.TaskStatus = {
|
|||||||
-- @field #AWACS.TaskStatus Status
|
-- @field #AWACS.TaskStatus Status
|
||||||
-- @field #AWACS.TaskDescription ToDo
|
-- @field #AWACS.TaskDescription ToDo
|
||||||
-- @field #string ScreenText Long descrition
|
-- @field #string ScreenText Long descrition
|
||||||
-- @field Ops.Intelligence#INTEL.Contact Contact
|
-- @field Ops.Intel#INTEL.Contact Contact
|
||||||
-- @field Ops.Intelligence#INTEL.Cluster Cluster
|
-- @field Ops.Intel#INTEL.Cluster Cluster
|
||||||
-- @field #number CurrentAuftrag
|
-- @field #number CurrentAuftrag
|
||||||
-- @field #number RequestedTimestamp
|
-- @field #number RequestedTimestamp
|
||||||
|
|
||||||
@ -2463,7 +2463,7 @@ function AWACS:_UpdateContactFromCluster(CID)
|
|||||||
|
|
||||||
local function GetFirstAliveContact(table)
|
local function GetFirstAliveContact(table)
|
||||||
for _,_contact in pairs (table) do
|
for _,_contact in pairs (table) do
|
||||||
local contact = _contact -- Ops.Intelligence#INTEL.Contact
|
local contact = _contact -- Ops.Intel#INTEL.Contact
|
||||||
if contact and contact.group and contact.group:IsAlive() then
|
if contact and contact.group and contact.group:IsAlive() then
|
||||||
return contact
|
return contact
|
||||||
end
|
end
|
||||||
@ -4260,7 +4260,7 @@ function AWACS:_StartIntel(awacs)
|
|||||||
|
|
||||||
intel:__Start(5)
|
intel:__Start(5)
|
||||||
|
|
||||||
self.intel = intel -- Ops.Intelligence#INTEL
|
self.intel = intel -- Ops.Intel#INTEL
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -4420,8 +4420,8 @@ end
|
|||||||
-- @param #table Object Object for Ops.Target#TARGET assignment
|
-- @param #table Object Object for Ops.Target#TARGET assignment
|
||||||
-- @param #AWACS.TaskStatus TaskStatus Status of this task
|
-- @param #AWACS.TaskStatus TaskStatus Status of this task
|
||||||
-- @param Ops.Auftrag#AUFTRAG Auftrag The Auftrag for this task if any
|
-- @param Ops.Auftrag#AUFTRAG Auftrag The Auftrag for this task if any
|
||||||
-- @param Ops.Intelligence#INTEL.Cluster Cluster Intel Cluster for this task
|
-- @param Ops.Intel#INTEL.Cluster Cluster Intel Cluster for this task
|
||||||
-- @param Ops.Intelligence#INTEL.Contact Contact Intel Contact for this task
|
-- @param Ops.Intel#INTEL.Contact Contact Intel Contact for this task
|
||||||
-- @return #number TID Task ID created
|
-- @return #number TID Task ID created
|
||||||
function AWACS:_CreateTaskForGroup(GroupID,Description,ScreenText,Object,TaskStatus,Auftrag,Cluster,Contact)
|
function AWACS:_CreateTaskForGroup(GroupID,Description,ScreenText,Object,TaskStatus,Auftrag,Cluster,Contact)
|
||||||
self:T(self.lid.."_CreateTaskForGroup "..GroupID .." Description: "..Description)
|
self:T(self.lid.."_CreateTaskForGroup "..GroupID .." Description: "..Description)
|
||||||
@ -5063,7 +5063,7 @@ function AWACS:_AnnounceContact(Contact,IsNew,Group,IsBogeyDope,Tag,IsPopup,Repo
|
|||||||
end
|
end
|
||||||
|
|
||||||
local cluster = Contact.Cluster
|
local cluster = Contact.Cluster
|
||||||
local intel = self.intel -- Ops.Intelligence#INTEL
|
local intel = self.intel -- Ops.Intel#INTEL
|
||||||
|
|
||||||
local size = self.intel:ClusterCountUnits(cluster)
|
local size = self.intel:ClusterCountUnits(cluster)
|
||||||
local threatsize, threatsizetext = self:_GetBlurredSize(size)
|
local threatsize, threatsizetext = self:_GetBlurredSize(size)
|
||||||
@ -5465,7 +5465,7 @@ function AWACS:_TACRangeCall(GID,Contact)
|
|||||||
if not Contact then return self end
|
if not Contact then return self end
|
||||||
local pilotcallsign = self:_GetCallSign(nil,GID)
|
local pilotcallsign = self:_GetCallSign(nil,GID)
|
||||||
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
||||||
local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact
|
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
|
||||||
local contacttag = Contact.TargetGroupNaming
|
local contacttag = Contact.TargetGroupNaming
|
||||||
if contact and not Contact.TACCallDone then
|
if contact and not Contact.TACCallDone then
|
||||||
local position = contact.position -- Core.Point#COORDINATE
|
local position = contact.position -- Core.Point#COORDINATE
|
||||||
@ -5494,7 +5494,7 @@ function AWACS:_MeldRangeCall(GID,Contact)
|
|||||||
local pilotcallsign = self:_GetCallSign(nil,GID)
|
local pilotcallsign = self:_GetCallSign(nil,GID)
|
||||||
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
||||||
local flightpos = managedgroup.Group:GetCoordinate()
|
local flightpos = managedgroup.Group:GetCoordinate()
|
||||||
local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact
|
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
|
||||||
local contacttag = Contact.TargetGroupNaming
|
local contacttag = Contact.TargetGroupNaming
|
||||||
if contact and not Contact.MeldCallDone then
|
if contact and not Contact.MeldCallDone then
|
||||||
local position = contact.position -- Core.Point#COORDINATE
|
local position = contact.position -- Core.Point#COORDINATE
|
||||||
@ -5524,7 +5524,7 @@ function AWACS:_ThreatRangeCall(GID,Contact)
|
|||||||
local pilotcallsign = self:_GetCallSign(nil,GID)
|
local pilotcallsign = self:_GetCallSign(nil,GID)
|
||||||
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
||||||
local flightpos = managedgroup.Group:GetCoordinate() or managedgroup.LastKnownPosition
|
local flightpos = managedgroup.Group:GetCoordinate() or managedgroup.LastKnownPosition
|
||||||
local contact = Contact.Contact -- Ops.Intelligence#INTEL.Contact
|
local contact = Contact.Contact -- Ops.Intel#INTEL.Contact
|
||||||
local contacttag = Contact.TargetGroupNaming
|
local contacttag = Contact.TargetGroupNaming
|
||||||
if contact then
|
if contact then
|
||||||
local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE
|
local position = contact.position or contact.group:GetCoordinate() -- Core.Point#COORDINATE
|
||||||
@ -6426,7 +6426,7 @@ end
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string Event
|
-- @param #string Event
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Ops.Intelligence#INTEL.Cluster Cluster
|
-- @param Ops.Intel#INTEL.Cluster Cluster
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
||||||
self:T({From, Event, To, Cluster.index})
|
self:T({From, Event, To, Cluster.index})
|
||||||
@ -6438,7 +6438,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
|||||||
|
|
||||||
local function GetFirstAliveContact(table)
|
local function GetFirstAliveContact(table)
|
||||||
for _,_contact in pairs (table) do
|
for _,_contact in pairs (table) do
|
||||||
local contact = _contact -- Ops.Intelligence#INTEL.Contact
|
local contact = _contact -- Ops.Intel#INTEL.Contact
|
||||||
if contact and contact.group and contact.group:IsAlive() then
|
if contact and contact.group and contact.group:IsAlive() then
|
||||||
return contact, contact.group
|
return contact, contact.group
|
||||||
end
|
end
|
||||||
@ -6446,7 +6446,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local Contact, Group = GetFirstAliveContact(ContactTable) -- Ops.Intelligence#INTEL.Contact
|
local Contact, Group = GetFirstAliveContact(ContactTable) -- Ops.Intel#INTEL.Contact
|
||||||
|
|
||||||
if not Contact then return self end
|
if not Contact then return self end
|
||||||
|
|
||||||
@ -6457,7 +6457,7 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
|||||||
local targetset = SET_GROUP:New()
|
local targetset = SET_GROUP:New()
|
||||||
-- SET for TARGET
|
-- SET for TARGET
|
||||||
for _,_grp in pairs(ContactTable) do
|
for _,_grp in pairs(ContactTable) do
|
||||||
local grp = _grp -- Ops.Intelligence#INTEL.Contact
|
local grp = _grp -- Ops.Intel#INTEL.Contact
|
||||||
targetset:AddGroup(grp.group, true)
|
targetset:AddGroup(grp.group, true)
|
||||||
end
|
end
|
||||||
local managedcontact = {} -- #AWACS.ManagedContact
|
local managedcontact = {} -- #AWACS.ManagedContact
|
||||||
@ -6519,7 +6519,7 @@ end
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string Event
|
-- @param #string Event
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Ops.Intelligence#INTEL.Contact Contact
|
-- @param Ops.Intel#INTEL.Contact Contact
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:onafterNewContact(From,Event,To,Contact)
|
function AWACS:onafterNewContact(From,Event,To,Contact)
|
||||||
self:T({From, Event, To, Contact})
|
self:T({From, Event, To, Contact})
|
||||||
@ -6548,7 +6548,7 @@ end
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string Event
|
-- @param #string Event
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Ops.Intelligence#INTEL.Contact Contact
|
-- @param Ops.Intel#INTEL.Contact Contact
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:onafterLostContact(From,Event,To,Contact)
|
function AWACS:onafterLostContact(From,Event,To,Contact)
|
||||||
self:T({From, Event, To, Contact})
|
self:T({From, Event, To, Contact})
|
||||||
@ -6560,7 +6560,7 @@ end
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string Event
|
-- @param #string Event
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Ops.Intelligence#INTEL.Cluster Cluster
|
-- @param Ops.Intel#INTEL.Cluster Cluster
|
||||||
-- @param Ops.Auftrag#AUFTRAG Mission
|
-- @param Ops.Auftrag#AUFTRAG Mission
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:onafterLostCluster(From,Event,To,Cluster,Mission)
|
function AWACS:onafterLostCluster(From,Event,To,Cluster,Mission)
|
||||||
|
|||||||
@ -702,7 +702,7 @@ function EASYGCICAP:_SetTankerPatrolPoints()
|
|||||||
self:T(self.lid.."_SetTankerPatrolPoints")
|
self:T(self.lid.."_SetTankerPatrolPoints")
|
||||||
for _,_data in pairs(self.ManagedTK) do
|
for _,_data in pairs(self.ManagedTK) do
|
||||||
local data = _data --#EASYGCICAP.CapPoint
|
local data = _data --#EASYGCICAP.CapPoint
|
||||||
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
|
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
local Coordinate = data.Coordinate
|
local Coordinate = data.Coordinate
|
||||||
local Altitude = data.Altitude
|
local Altitude = data.Altitude
|
||||||
local Speed = data.Speed
|
local Speed = data.Speed
|
||||||
@ -721,7 +721,7 @@ function EASYGCICAP:_SetAwacsPatrolPoints()
|
|||||||
self:T(self.lid.."_SetAwacsPatrolPoints")
|
self:T(self.lid.."_SetAwacsPatrolPoints")
|
||||||
for _,_data in pairs(self.ManagedEWR) do
|
for _,_data in pairs(self.ManagedEWR) do
|
||||||
local data = _data --#EASYGCICAP.CapPoint
|
local data = _data --#EASYGCICAP.CapPoint
|
||||||
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
|
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
local Coordinate = data.Coordinate
|
local Coordinate = data.Coordinate
|
||||||
local Altitude = data.Altitude
|
local Altitude = data.Altitude
|
||||||
local Speed = data.Speed
|
local Speed = data.Speed
|
||||||
@ -740,7 +740,7 @@ function EASYGCICAP:_SetCAPPatrolPoints()
|
|||||||
self:T(self.lid.."_SetCAPPatrolPoints")
|
self:T(self.lid.."_SetCAPPatrolPoints")
|
||||||
for _,_data in pairs(self.ManagedCP) do
|
for _,_data in pairs(self.ManagedCP) do
|
||||||
local data = _data --#EASYGCICAP.CapPoint
|
local data = _data --#EASYGCICAP.CapPoint
|
||||||
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
|
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
local Coordinate = data.Coordinate
|
local Coordinate = data.Coordinate
|
||||||
local Altitude = data.Altitude
|
local Altitude = data.Altitude
|
||||||
local Speed = data.Speed
|
local Speed = data.Speed
|
||||||
@ -759,7 +759,7 @@ function EASYGCICAP:_SetReconPatrolPoints()
|
|||||||
self:T(self.lid.."_SetReconPatrolPoints")
|
self:T(self.lid.."_SetReconPatrolPoints")
|
||||||
for _,_data in pairs(self.ManagedREC) do
|
for _,_data in pairs(self.ManagedREC) do
|
||||||
local data = _data --#EASYGCICAP.CapPoint
|
local data = _data --#EASYGCICAP.CapPoint
|
||||||
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
|
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
local Coordinate = data.Coordinate
|
local Coordinate = data.Coordinate
|
||||||
local Altitude = data.Altitude
|
local Altitude = data.Altitude
|
||||||
local Speed = data.Speed
|
local Speed = data.Speed
|
||||||
@ -947,7 +947,7 @@ function EASYGCICAP:_AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames
|
|||||||
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
||||||
Squadron_One:SetMissionRange(self.missionrange)
|
Squadron_One:SetMissionRange(self.missionrange)
|
||||||
|
|
||||||
local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING
|
local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
|
|
||||||
wing:AddSquadron(Squadron_One)
|
wing:AddSquadron(Squadron_One)
|
||||||
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.PATROLRACETRACK, AUFTRAG.Type.ALERT5},75)
|
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.PATROLRACETRACK, AUFTRAG.Type.ALERT5},75)
|
||||||
@ -978,7 +978,7 @@ function EASYGCICAP:_AddReconSquadron(TemplateName, SquadName, AirbaseName, AirF
|
|||||||
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
||||||
Squadron_One:SetMissionRange(self.missionrange)
|
Squadron_One:SetMissionRange(self.missionrange)
|
||||||
|
|
||||||
local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING
|
local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
|
|
||||||
wing:AddSquadron(Squadron_One)
|
wing:AddSquadron(Squadron_One)
|
||||||
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.RECON},75)
|
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.RECON},75)
|
||||||
@ -1014,7 +1014,7 @@ function EASYGCICAP:_AddTankerSquadron(TemplateName, SquadName, AirbaseName, Air
|
|||||||
Squadron_One:SetRadio(Frequency,Modulation)
|
Squadron_One:SetRadio(Frequency,Modulation)
|
||||||
Squadron_One:AddTacanChannel(TACAN,TACAN)
|
Squadron_One:AddTacanChannel(TACAN,TACAN)
|
||||||
|
|
||||||
local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING
|
local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
|
|
||||||
wing:AddSquadron(Squadron_One)
|
wing:AddSquadron(Squadron_One)
|
||||||
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.TANKER},75)
|
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.TANKER},75)
|
||||||
@ -1047,7 +1047,7 @@ function EASYGCICAP:_AddAWACSSquadron(TemplateName, SquadName, AirbaseName, AirF
|
|||||||
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
|
||||||
Squadron_One:SetMissionRange(self.missionrange)
|
Squadron_One:SetMissionRange(self.missionrange)
|
||||||
Squadron_One:SetRadio(Frequency,Modulation)
|
Squadron_One:SetRadio(Frequency,Modulation)
|
||||||
local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING
|
local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
|
|
||||||
wing:AddSquadron(Squadron_One)
|
wing:AddSquadron(Squadron_One)
|
||||||
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.AWACS},75)
|
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.AWACS},75)
|
||||||
@ -1151,7 +1151,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
local position = self.Intel: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.Intel: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))
|
||||||
@ -1164,7 +1164,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
if (retrymission) and (wingsize >= 1) then
|
if (retrymission) and (wingsize >= 1) then
|
||||||
MESSAGE:New(string.format("**** %s Interceptors need wingsize %d", UTILS.GetCoalitionName(self.coalition), wingsize),15,"CAPGCI"):ToAllIf(self.debug):ToLog()
|
MESSAGE:New(string.format("**** %s Interceptors need wingsize %d", UTILS.GetCoalitionName(self.coalition), wingsize),15,"CAPGCI"):ToAllIf(self.debug):ToLog()
|
||||||
for _,_data in pairs (wings) do
|
for _,_data in pairs (wings) do
|
||||||
local airwing = _data[1] -- Ops.AirWing#AIRWING
|
local airwing = _data[1] -- Ops.Airwing#AIRWING
|
||||||
local zone = _data[2] -- Core.Zone#ZONE
|
local zone = _data[2] -- Core.Zone#ZONE
|
||||||
local zonecoord = zone:GetCoordinate()
|
local zonecoord = zone:GetCoordinate()
|
||||||
local name = _data[3] -- #string
|
local name = _data[3] -- #string
|
||||||
@ -1177,7 +1177,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
for _,_data in pairs (ctlpts) do
|
for _,_data in pairs (ctlpts) do
|
||||||
--local airwing = _data[1] -- Ops.AirWing#AIRWING
|
--local airwing = _data[1] -- Ops.Airwing#AIRWING
|
||||||
--local zone = _data[2] -- Core.Zone#ZONE
|
--local zone = _data[2] -- Core.Zone#ZONE
|
||||||
--local zonecoord = zone:GetCoordinate()
|
--local zonecoord = zone:GetCoordinate()
|
||||||
--local name = _data[3] -- #string
|
--local name = _data[3] -- #string
|
||||||
@ -1191,7 +1191,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
local airframes = airwing:CountAssets(true)
|
local airframes = airwing:CountAssets(true)
|
||||||
if distance < bestdistance and airframes >= wingsize then
|
if distance < bestdistance and airframes >= wingsize then
|
||||||
bestdistance = distance
|
bestdistance = distance
|
||||||
targetairwing = airwing -- Ops.AirWing#AIRWING
|
targetairwing = airwing -- Ops.Airwing#AIRWING
|
||||||
targetawname = name
|
targetawname = name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -695,7 +695,7 @@ end
|
|||||||
|
|
||||||
--- Get airwing the flight group belongs to.
|
--- Get airwing the flight group belongs to.
|
||||||
-- @param #FLIGHTGROUP self
|
-- @param #FLIGHTGROUP self
|
||||||
-- @return Ops.AirWing#AIRWING The AIRWING object (if any).
|
-- @return Ops.Airwing#AIRWING The AIRWING object (if any).
|
||||||
function FLIGHTGROUP:GetAirwing()
|
function FLIGHTGROUP:GetAirwing()
|
||||||
return self.legion
|
return self.legion
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2272,7 +2272,7 @@ function INTEL:GetHighestThreatContact(Cluster)
|
|||||||
|
|
||||||
for _,_contact in pairs(Cluster.Contacts) do
|
for _,_contact in pairs(Cluster.Contacts) do
|
||||||
|
|
||||||
local contact=_contact --Ops.Intelligence#INTEL.Contact
|
local contact=_contact --Ops.Intel#INTEL.Contact
|
||||||
|
|
||||||
if contact.threatlevel>threatlevel then
|
if contact.threatlevel>threatlevel then
|
||||||
threatlevel=contact.threatlevel
|
threatlevel=contact.threatlevel
|
||||||
@ -2312,8 +2312,8 @@ end
|
|||||||
-- @field #string alias Alias name for logging.
|
-- @field #string alias Alias name for logging.
|
||||||
-- @field #number cachetime Number of seconds to keep an object.
|
-- @field #number cachetime Number of seconds to keep an object.
|
||||||
-- @field #number interval Number of seconds between collection runs.
|
-- @field #number interval Number of seconds between collection runs.
|
||||||
-- @field #table contacts Table of Ops.Intelligence#INTEL.Contact contacts.
|
-- @field #table contacts Table of Ops.Intel#INTEL.Contact contacts.
|
||||||
-- @field #table clusters Table of Ops.Intelligence#INTEL.Cluster clusters.
|
-- @field #table clusters Table of Ops.Intel#INTEL.Cluster clusters.
|
||||||
-- @field #table contactcoords Table of contacts' Core.Point#COORDINATE objects.
|
-- @field #table contactcoords Table of contacts' Core.Point#COORDINATE objects.
|
||||||
-- @extends Core.Fsm#FSM
|
-- @extends Core.Fsm#FSM
|
||||||
|
|
||||||
@ -2337,7 +2337,7 @@ INTEL_DLINK.version = "0.0.1"
|
|||||||
|
|
||||||
--- Function to instantiate a new object
|
--- Function to instantiate a new object
|
||||||
-- @param #INTEL_DLINK self
|
-- @param #INTEL_DLINK self
|
||||||
-- @param #table Intels Table of Ops.Intelligence#INTEL objects.
|
-- @param #table Intels Table of Ops.Intel#INTEL objects.
|
||||||
-- @param #string Alias (optional) Name of this instance. Default "SPECTRE"
|
-- @param #string Alias (optional) Name of this instance. Default "SPECTRE"
|
||||||
-- @param #number Interval (optional) When to query #INTEL objects for detected items (default 20 seconds).
|
-- @param #number Interval (optional) When to query #INTEL objects for detected items (default 20 seconds).
|
||||||
-- @param #number Cachetime (optional) How long to cache detected items (default 300 seconds).
|
-- @param #number Cachetime (optional) How long to cache detected items (default 300 seconds).
|
||||||
@ -2449,7 +2449,7 @@ end
|
|||||||
|
|
||||||
--- Function to add an #INTEL object to the aggregator
|
--- Function to add an #INTEL object to the aggregator
|
||||||
-- @param #INTEL_DLINK self
|
-- @param #INTEL_DLINK self
|
||||||
-- @param Ops.Intelligence#INTEL Intel the #INTEL object to add
|
-- @param Ops.Intel#INTEL Intel the #INTEL object to add
|
||||||
-- @return #INTEL_DLINK self
|
-- @return #INTEL_DLINK self
|
||||||
function INTEL_DLINK:AddIntel(Intel)
|
function INTEL_DLINK:AddIntel(Intel)
|
||||||
self:T(self.lid .. "AddIntel")
|
self:T(self.lid .. "AddIntel")
|
||||||
|
|||||||
@ -3946,7 +3946,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName)
|
|||||||
|
|
||||||
local function NewCluster(Cluster)
|
local function NewCluster(Cluster)
|
||||||
if not self.usecluster then return self end
|
if not self.usecluster then return self end
|
||||||
local cluster = Cluster -- Ops.Intelligence#INTEL.Cluster
|
local cluster = Cluster -- Ops.Intel#INTEL.Cluster
|
||||||
local type = cluster.ctype
|
local type = cluster.ctype
|
||||||
self:T({type,self.Type})
|
self:T({type,self.Type})
|
||||||
if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then
|
if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then
|
||||||
@ -3954,7 +3954,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName)
|
|||||||
local contacts = cluster.Contacts -- #table of GROUP
|
local contacts = cluster.Contacts -- #table of GROUP
|
||||||
local targetset = SET_GROUP:New()
|
local targetset = SET_GROUP:New()
|
||||||
for _,_object in pairs(contacts) do
|
for _,_object in pairs(contacts) do
|
||||||
local contact = _object -- Ops.Intelligence#INTEL.Contact
|
local contact = _object -- Ops.Intel#INTEL.Contact
|
||||||
self:T("Adding group: "..contact.groupname)
|
self:T("Adding group: "..contact.groupname)
|
||||||
targetset:AddGroup(contact.group,true)
|
targetset:AddGroup(contact.group,true)
|
||||||
end
|
end
|
||||||
@ -3966,14 +3966,14 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName)
|
|||||||
if type == INTEL.Ctype.GROUND then
|
if type == INTEL.Ctype.GROUND then
|
||||||
targetset = SET_GROUP:New()
|
targetset = SET_GROUP:New()
|
||||||
for _,_object in pairs(contacts) do
|
for _,_object in pairs(contacts) do
|
||||||
local contact = _object -- Ops.Intelligence#INTEL.Contact
|
local contact = _object -- Ops.Intel#INTEL.Contact
|
||||||
self:T("Adding group: "..contact.groupname)
|
self:T("Adding group: "..contact.groupname)
|
||||||
targetset:AddGroup(contact.group,true)
|
targetset:AddGroup(contact.group,true)
|
||||||
end
|
end
|
||||||
elseif type == INTEL.Ctype.STRUCTURE then
|
elseif type == INTEL.Ctype.STRUCTURE then
|
||||||
targetset = SET_STATIC:New()
|
targetset = SET_STATIC:New()
|
||||||
for _,_object in pairs(contacts) do
|
for _,_object in pairs(contacts) do
|
||||||
local contact = _object -- Ops.Intelligence#INTEL.Contact
|
local contact = _object -- Ops.Intel#INTEL.Contact
|
||||||
self:T("Adding static: "..contact.groupname)
|
self:T("Adding static: "..contact.groupname)
|
||||||
targetset:AddStatic(contact.group)
|
targetset:AddStatic(contact.group)
|
||||||
end
|
end
|
||||||
@ -3986,7 +3986,7 @@ function PLAYERTASKCONTROLLER:SetupIntel(RecceName)
|
|||||||
|
|
||||||
local function NewContact(Contact)
|
local function NewContact(Contact)
|
||||||
if self.usecluster then return self end
|
if self.usecluster then return self end
|
||||||
local contact = Contact -- Ops.Intelligence#INTEL.Contact
|
local contact = Contact -- Ops.Intel#INTEL.Contact
|
||||||
local type = contact.ctype
|
local type = contact.ctype
|
||||||
self:T({type,self.Type})
|
self:T({type,self.Type})
|
||||||
if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then
|
if (type == INTEL.Ctype.AIRCRAFT and self.Type == PLAYERTASKCONTROLLER.Type.A2A) or (type == INTEL.Ctype.NAVAL and (self.Type == PLAYERTASKCONTROLLER.Type.A2S or self.Type == PLAYERTASKCONTROLLER.Type.A2GS)) then
|
||||||
|
|||||||
@ -243,7 +243,7 @@ end
|
|||||||
|
|
||||||
--- Set airwing.
|
--- Set airwing.
|
||||||
-- @param #SQUADRON self
|
-- @param #SQUADRON self
|
||||||
-- @param Ops.AirWing#AIRWING Airwing The airwing.
|
-- @param Ops.Airwing#AIRWING Airwing The airwing.
|
||||||
-- @return #SQUADRON self
|
-- @return #SQUADRON self
|
||||||
function SQUADRON:SetAirwing(Airwing)
|
function SQUADRON:SetAirwing(Airwing)
|
||||||
self.legion=Airwing
|
self.legion=Airwing
|
||||||
@ -252,7 +252,7 @@ end
|
|||||||
|
|
||||||
--- Get airwing.
|
--- Get airwing.
|
||||||
-- @param #SQUADRON self
|
-- @param #SQUADRON self
|
||||||
-- @return Ops.AirWing#AIRWING The airwing.
|
-- @return Ops.Airwing#AIRWING The airwing.
|
||||||
function SQUADRON:GetAirwing(Airwing)
|
function SQUADRON:GetAirwing(Airwing)
|
||||||
return self.legion
|
return self.legion
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user