mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 17:07:54 +00:00
Updates
This commit is contained in:
@@ -1170,9 +1170,6 @@ do -- AI_A2A_DISPATCHER
|
|||||||
end
|
end
|
||||||
DefenderSquadron.Resources = Resources
|
DefenderSquadron.Resources = Resources
|
||||||
|
|
||||||
self:SetSquadronOverhead( SquadronName, 1 )
|
|
||||||
self:SetSquadronLandingNearAirbase(SquadronName)
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2561,7 +2558,7 @@ do
|
|||||||
--- @type AI_A2A_GCICAP
|
--- @type AI_A2A_GCICAP
|
||||||
-- @extends #AI_A2A_DISPATCHER
|
-- @extends #AI_A2A_DISPATCHER
|
||||||
|
|
||||||
--- # AI\_A2A\_GCICAP class, extends @{AI#AI_A2A_DISPATCHER}
|
--- # AI\_A2A\_GCICAP class, extends @{AI_A2A_Dispatcher#AI_A2A_DISPATCHER}
|
||||||
--
|
--
|
||||||
-- 
|
-- 
|
||||||
--
|
--
|
||||||
@@ -2824,9 +2821,14 @@ do
|
|||||||
|
|
||||||
--- AI_A2A_GCICAP constructor.
|
--- AI_A2A_GCICAP constructor.
|
||||||
-- @param #AI_A2A_GCICAP self
|
-- @param #AI_A2A_GCICAP self
|
||||||
-- @param #list<#string> EWRPrefixes A list of prefixes that of groups that setup the Early Warning Radar network.
|
-- @param #string EWRPrefixes A list of prefixes that of groups that setup the Early Warning Radar network.
|
||||||
|
-- @param #string TemplatePrefixes A list of template prefixes.
|
||||||
|
-- @param #string CapPrefixes A list of CAP zone prefixes (polygon zones).
|
||||||
|
-- @param #number CapLimit A number of how many CAP maximum will be spawned.
|
||||||
-- @param #number GroupingRadius The radius in meters wherein detected planes are being grouped as one target area.
|
-- @param #number GroupingRadius The radius in meters wherein detected planes are being grouped as one target area.
|
||||||
-- For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.
|
-- For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.
|
||||||
|
-- @param #number EngageRadius The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.
|
||||||
|
-- @param #number GciRadius The radius in meters wherein detected airplanes will GCI.
|
||||||
-- @return #AI_A2A_GCICAP
|
-- @return #AI_A2A_GCICAP
|
||||||
-- @usage
|
-- @usage
|
||||||
--
|
--
|
||||||
@@ -2835,10 +2837,11 @@ do
|
|||||||
--
|
--
|
||||||
-- A2ADispatcher = AI_A2A_GCICAP:New( { "BlueEWRGroundRadars", "BlueEWRAwacs" }, 30000 )
|
-- A2ADispatcher = AI_A2A_GCICAP:New( { "BlueEWRGroundRadars", "BlueEWRAwacs" }, 30000 )
|
||||||
--
|
--
|
||||||
function AI_A2A_GCICAP:New( EWRPrefixes, TemplatePrefixes, CAPPrefixes, CapLimit, GroupingRadius, EngageRadius )
|
function AI_A2A_GCICAP:New( EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius )
|
||||||
|
|
||||||
GroupingRadius = GroupingRadius or 30000
|
GroupingRadius = GroupingRadius or 30000
|
||||||
EngageRadius = EngageRadius or 100000
|
EngageRadius = EngageRadius or 100000
|
||||||
|
GciRadius = GciRadius or 150000
|
||||||
|
|
||||||
local EWRSetGroup = SET_GROUP:New()
|
local EWRSetGroup = SET_GROUP:New()
|
||||||
EWRSetGroup:FilterPrefixes( EWRPrefixes )
|
EWRSetGroup:FilterPrefixes( EWRPrefixes )
|
||||||
@@ -2849,12 +2852,12 @@ do
|
|||||||
local self = BASE:Inherit( self, AI_A2A_DISPATCHER:New( Detection ) ) -- #AI_A2A_GCICAP
|
local self = BASE:Inherit( self, AI_A2A_DISPATCHER:New( Detection ) ) -- #AI_A2A_GCICAP
|
||||||
|
|
||||||
self:SetEngageRadius( EngageRadius )
|
self:SetEngageRadius( EngageRadius )
|
||||||
|
self:SetGciRadius( GciRadius )
|
||||||
|
|
||||||
-- Determine the coalition of the EWRNetwork, this will be the coalition of the GCICAP.
|
-- Determine the coalition of the EWRNetwork, this will be the coalition of the GCICAP.
|
||||||
local EWRFirst = EWRSetGroup:GetFirst() -- Wrapper.Group#GROUP
|
local EWRFirst = EWRSetGroup:GetFirst() -- Wrapper.Group#GROUP
|
||||||
local EWRCoalition = EWRFirst:GetCoalition()
|
local EWRCoalition = EWRFirst:GetCoalition()
|
||||||
|
|
||||||
|
|
||||||
-- Determine the airbases belonging to the coalition.
|
-- Determine the airbases belonging to the coalition.
|
||||||
local AirbaseNames = {} -- #list<#string>
|
local AirbaseNames = {} -- #list<#string>
|
||||||
for AirbaseID, AirbaseData in pairs( _DATABASE.AIRBASES ) do
|
for AirbaseID, AirbaseData in pairs( _DATABASE.AIRBASES ) do
|
||||||
@@ -2899,7 +2902,7 @@ do
|
|||||||
-- CAP will be launched from there.
|
-- CAP will be launched from there.
|
||||||
|
|
||||||
self.CAPTemplates = SET_GROUP:New()
|
self.CAPTemplates = SET_GROUP:New()
|
||||||
self.CAPTemplates:FilterPrefixes( CAPPrefixes )
|
self.CAPTemplates:FilterPrefixes( CapPrefixes )
|
||||||
self.CAPTemplates:FilterOnce()
|
self.CAPTemplates:FilterOnce()
|
||||||
|
|
||||||
for CAPID, CAPTemplate in pairs( self.CAPTemplates:GetSet() ) do
|
for CAPID, CAPTemplate in pairs( self.CAPTemplates:GetSet() ) do
|
||||||
@@ -2942,5 +2945,36 @@ do
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- AI_A2A_GCICAP constructor with border.
|
||||||
|
-- @param #AI_A2A_GCICAP self
|
||||||
|
-- @param #string EWRPrefixes A list of prefixes that of groups that setup the Early Warning Radar network.
|
||||||
|
-- @param #string TemplatePrefixes A list of template prefixes.
|
||||||
|
-- @param #string BorderPrefix A Border Zone Prefix.
|
||||||
|
-- @param #string CapPrefixes A list of CAP zone prefixes (polygon zones).
|
||||||
|
-- @param #number CapLimit A number of how many CAP maximum will be spawned.
|
||||||
|
-- @param #number GroupingRadius The radius in meters wherein detected planes are being grouped as one target area.
|
||||||
|
-- For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.
|
||||||
|
-- @param #number EngageRadius The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.
|
||||||
|
-- @param #number GciRadius The radius in meters wherein detected airplanes will GCI.
|
||||||
|
-- @return #AI_A2A_GCICAP
|
||||||
|
-- @usage
|
||||||
|
--
|
||||||
|
-- -- Set a new AI A2A GCICAP object, based on an EWR network with a 30 km grouping radius
|
||||||
|
-- -- This for ground and awacs installations.
|
||||||
|
--
|
||||||
|
-- A2ADispatcher = AI_A2A_GCICAP:New( { "BlueEWRGroundRadars", "BlueEWRAwacs" }, 30000 )
|
||||||
|
--
|
||||||
|
function AI_A2A_GCICAP:NewWithBorder( EWRPrefixes, TemplatePrefixes, BorderPrefix, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius )
|
||||||
|
|
||||||
|
local self = AI_A2A_GCICAP:New( EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius )
|
||||||
|
|
||||||
|
if BorderPrefix then
|
||||||
|
self:SetBorderZone( ZONE_POLYGON:New( BorderPrefix, GROUP:FindByName( BorderPrefix ) ) )
|
||||||
|
end
|
||||||
|
|
||||||
|
return self
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user