mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update
This commit is contained in:
parent
b6ecd52444
commit
6f183bad74
@ -64,6 +64,7 @@ DATABASE = {
|
|||||||
COUNTRY_NAME = {},
|
COUNTRY_NAME = {},
|
||||||
NavPoints = {},
|
NavPoints = {},
|
||||||
PLAYERSETTINGS = {},
|
PLAYERSETTINGS = {},
|
||||||
|
ZONENAMES = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
local _DATABASECoalition =
|
local _DATABASECoalition =
|
||||||
@ -1024,6 +1025,11 @@ function DATABASE:_RegisterTemplates()
|
|||||||
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
|
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
|
||||||
end --for coa_name, coa_data in pairs(mission.coalition) do
|
end --for coa_name, coa_data in pairs(mission.coalition) do
|
||||||
|
|
||||||
|
for ZoneID, ZoneData in pairs( env.triggers.zones ) do
|
||||||
|
local ZoneName = ZoneData.Name
|
||||||
|
self.ZONENAMES[ZoneName] = ZoneName
|
||||||
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,9 @@ COMMANDCENTER = {
|
|||||||
CommandCenterCoalition = nil,
|
CommandCenterCoalition = nil,
|
||||||
CommandCenterPositionable = nil,
|
CommandCenterPositionable = nil,
|
||||||
Name = "",
|
Name = "",
|
||||||
|
ReferencePoints = {},
|
||||||
|
ReferenceNames = {},
|
||||||
|
CommunicationMode = "80",
|
||||||
}
|
}
|
||||||
--- The constructor takes an IDENTIFIABLE as the HQ command center.
|
--- The constructor takes an IDENTIFIABLE as the HQ command center.
|
||||||
-- @param #COMMANDCENTER self
|
-- @param #COMMANDCENTER self
|
||||||
@ -251,6 +254,34 @@ function COMMANDCENTER:RemoveMission( Mission )
|
|||||||
return Mission
|
return Mission
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Set reference points known by the command center to guide airborne units during WWII.
|
||||||
|
-- These reference points are zones, with a special name.
|
||||||
|
-- @param #COMMANDCENTER self
|
||||||
|
-- @param #string ReferenceZonePrefix Reference points.
|
||||||
|
-- @return #COMMANDCENTER
|
||||||
|
function COMMANDCENTER:SetReferenceZones( ReferenceZonePrefix )
|
||||||
|
local MatchPattern = "(" .. ReferenceZonePrefix .. ")" .. "#(a+)"
|
||||||
|
for ReferenceZoneName in pairs( _DATABASE.ZONENAMES ) do
|
||||||
|
local ZoneName, ReferenceName = string.match( ReferenceZoneName, MatchPattern )
|
||||||
|
self:T( { ZoneName = ZoneName, ReferenceName = ReferenceName } )
|
||||||
|
if ZoneName and ReferenceName then
|
||||||
|
self.ReferencePoints[ZoneName] = ZONE:New( ZoneName )
|
||||||
|
self.ReferenceNames[ZoneName] = ReferenceName
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Set the commandcenter operations in WWII mode
|
||||||
|
-- This will disable LL, MGRS, BRA, BULLS from the settings.
|
||||||
|
-- It will also disable the settings at the settings menu for these.
|
||||||
|
-- And, it will use any ReferenceZones set as reference points for communication.
|
||||||
|
-- @param #COMMANDCENTER self
|
||||||
|
-- @return #COMMANDCENTER
|
||||||
|
function COMMANDCENTER:SetModeWWII()
|
||||||
|
self.CommunicationMode = "WWII"
|
||||||
|
end
|
||||||
|
|
||||||
--- Sets the menu structure of the Missions governed by the HQ command center.
|
--- Sets the menu structure of the Missions governed by the HQ command center.
|
||||||
-- @param #COMMANDCENTER self
|
-- @param #COMMANDCENTER self
|
||||||
function COMMANDCENTER:SetMenu()
|
function COMMANDCENTER:SetMenu()
|
||||||
|
|||||||
@ -2,35 +2,6 @@
|
|||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
-- # 1) @{#TASK_A2A_DISPATCHER} class, extends @{#DETECTION_MANAGER}
|
|
||||||
--
|
|
||||||
-- The @{#TASK_A2A_DISPATCHER} class implements the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups.
|
|
||||||
-- The EWR will detect units, will group them, and will dispatch @{Task}s to groups. Depending on the type of target detected, different tasks will be dispatched.
|
|
||||||
-- Find a summary below describing for which situation a task type is created:
|
|
||||||
--
|
|
||||||
-- * **INTERCEPT Task**: Is created when the target is known, is detected and within a danger zone, and there is no friendly airborne in range.
|
|
||||||
-- * **SWEEP Task**: Is created when the target is unknown, was detected and the last position is only known, and within a danger zone, and there is no friendly airborne in range.
|
|
||||||
-- * **ENGAGE Task**: Is created when the target is known, is detected and within a danger zone, and there is a friendly airborne in range, that will receive this task.
|
|
||||||
--
|
|
||||||
-- Other task types will follow...
|
|
||||||
--
|
|
||||||
-- 3.1) TASK_A2A_DISPATCHER constructor:
|
|
||||||
-- --------------------------------------
|
|
||||||
-- The @{#TASK_A2A_DISPATCHER.New}() method creates a new TASK_A2A_DISPATCHER instance.
|
|
||||||
--
|
|
||||||
-- ===
|
|
||||||
--
|
|
||||||
-- # **API CHANGE HISTORY**
|
|
||||||
--
|
|
||||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
|
||||||
--
|
|
||||||
-- * **Added** parts are expressed in bold type face.
|
|
||||||
-- * _Removed_ parts are expressed in italic type face.
|
|
||||||
--
|
|
||||||
-- Hereby the change log:
|
|
||||||
--
|
|
||||||
-- ===
|
|
||||||
--
|
|
||||||
-- # **AUTHORS and CONTRIBUTIONS**
|
-- # **AUTHORS and CONTRIBUTIONS**
|
||||||
--
|
--
|
||||||
-- ### Contributions:
|
-- ### Contributions:
|
||||||
@ -45,10 +16,25 @@ do -- TASK_A2A_DISPATCHER
|
|||||||
|
|
||||||
--- TASK_A2A_DISPATCHER class.
|
--- TASK_A2A_DISPATCHER class.
|
||||||
-- @type TASK_A2A_DISPATCHER
|
-- @type TASK_A2A_DISPATCHER
|
||||||
-- @field Set#SET_GROUP SetGroup The groups to which the FAC will report to.
|
|
||||||
-- @field Functional.Detection#DETECTION_BASE Detection The DETECTION_BASE object that is used to report the detected objects. The Detection object will only function in RADAR mode!!!
|
|
||||||
-- @field Tasking.Mission#MISSION Mission
|
|
||||||
-- @extends Tasking.DetectionManager#DETECTION_MANAGER
|
-- @extends Tasking.DetectionManager#DETECTION_MANAGER
|
||||||
|
|
||||||
|
--- # TASK_A2A_DISPATCHER class, extends @{Tasking#DETECTION_MANAGER}
|
||||||
|
--
|
||||||
|
-- The @{#TASK_A2A_DISPATCHER} class implements the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups.
|
||||||
|
-- The EWR will detect units, will group them, and will dispatch @{Task}s to groups. Depending on the type of target detected, different tasks will be dispatched.
|
||||||
|
-- Find a summary below describing for which situation a task type is created:
|
||||||
|
--
|
||||||
|
-- * **INTERCEPT Task**: Is created when the target is known, is detected and within a danger zone, and there is no friendly airborne in range.
|
||||||
|
-- * **SWEEP Task**: Is created when the target is unknown, was detected and the last position is only known, and within a danger zone, and there is no friendly airborne in range.
|
||||||
|
-- * **ENGAGE Task**: Is created when the target is known, is detected and within a danger zone, and there is a friendly airborne in range, that will receive this task.
|
||||||
|
--
|
||||||
|
-- Other task types will follow...
|
||||||
|
--
|
||||||
|
-- # TASK_A2A_DISPATCHER constructor:
|
||||||
|
-- --------------------------------------
|
||||||
|
-- The @{#TASK_A2A_DISPATCHER.New}() method creates a new TASK_A2A_DISPATCHER instance.
|
||||||
|
--
|
||||||
|
-- @field #TASK_A2A_DISPATCHER
|
||||||
TASK_A2A_DISPATCHER = {
|
TASK_A2A_DISPATCHER = {
|
||||||
ClassName = "TASK_A2A_DISPATCHER",
|
ClassName = "TASK_A2A_DISPATCHER",
|
||||||
Mission = nil,
|
Mission = nil,
|
||||||
@ -71,6 +57,8 @@ do -- TASK_A2A_DISPATCHER
|
|||||||
self.Detection = Detection
|
self.Detection = Detection
|
||||||
self.Mission = Mission
|
self.Mission = Mission
|
||||||
|
|
||||||
|
|
||||||
|
-- TODO: Check detection through radar.
|
||||||
self.Detection:FilterCategories( Unit.Category.AIRPLANE, Unit.Category.HELICOPTER )
|
self.Detection:FilterCategories( Unit.Category.AIRPLANE, Unit.Category.HELICOPTER )
|
||||||
--self.Detection:InitDetectRadar( true )
|
--self.Detection:InitDetectRadar( true )
|
||||||
self.Detection:SetDetectionInterval( 30 )
|
self.Detection:SetDetectionInterval( 30 )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user