mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into FC/DETECTION_UNITS_class_broken___#773
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module CommandCenter
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-- ===
|
||||
--
|
||||
-- 1) @{DetectionManager#DETECTION_MANAGER} class, extends @{Fsm#FSM}
|
||||
-- ====================================================================
|
||||
-- ===
|
||||
-- The @{DetectionManager#DETECTION_MANAGER} class defines the core functions to report detected objects to groups.
|
||||
-- Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.
|
||||
--
|
||||
@@ -27,7 +27,7 @@
|
||||
-- ===
|
||||
--
|
||||
-- 2) @{DetectionManager#DETECTION_REPORTING} class, extends @{DetectionManager#DETECTION_MANAGER}
|
||||
-- =========================================================================================
|
||||
-- ===
|
||||
-- The @{DetectionManager#DETECTION_REPORTING} class implements detected units reporting. Reporting can be controlled using the reporting methods available in the @{DetectionManager#DETECTION_MANAGER} class.
|
||||
--
|
||||
-- 2.1) DETECTION_REPORTING constructor:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- **Tasking** -- A MISSION is the main owner of a Mission orchestration within MOOSE.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
@@ -46,6 +46,7 @@ function MISSION:New( CommandCenter, MissionName, MissionPriority, MissionBriefi
|
||||
self.MissionCoalition = MissionCoalition
|
||||
|
||||
self.Tasks = {}
|
||||
self.TaskNumber = 0
|
||||
self.PlayerNames = {} -- These are the players that achieved progress in the mission.
|
||||
|
||||
self:SetStartState( "IDLE" )
|
||||
@@ -307,7 +308,7 @@ end
|
||||
-- @param Wrapper.Group#GROUP PlayerGroup The GROUP of the player joining the Mission.
|
||||
-- @return #boolean true if Unit is part of a Task in the Mission.
|
||||
function MISSION:JoinUnit( PlayerUnit, PlayerGroup )
|
||||
self:E( { Mission = self:GetName(), PlayerUnit = PlayerUnit, PlayerGroup = PlayerGroup } )
|
||||
self:I( { Mission = self:GetName(), PlayerUnit = PlayerUnit, PlayerGroup = PlayerGroup } )
|
||||
|
||||
local PlayerUnitAdded = false
|
||||
|
||||
@@ -459,7 +460,7 @@ do -- Group Assignment
|
||||
local MissionGroupName = MissionGroup:GetName()
|
||||
|
||||
self.AssignedGroups[MissionGroupName] = MissionGroup
|
||||
self:E( string.format( "Mission %s is assigned to %s", MissionName, MissionGroupName ) )
|
||||
self:I( string.format( "Mission %s is assigned to %s", MissionName, MissionGroupName ) )
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -568,6 +569,18 @@ function MISSION:GetTask( TaskName )
|
||||
end
|
||||
|
||||
|
||||
--- Return the next @{Task} ID to be completed within the @{Mission}.
|
||||
-- @param #MISSION self
|
||||
-- @param Tasking.Task#TASK Task is the @{Task} object.
|
||||
-- @return Tasking.Task#TASK The task added.
|
||||
function MISSION:GetNextTaskID( Task )
|
||||
|
||||
self.TaskNumber = self.TaskNumber + 1
|
||||
|
||||
return self.TaskNumber
|
||||
end
|
||||
|
||||
|
||||
--- Register a @{Task} to be completed within the @{Mission}.
|
||||
-- Note that there can be multiple @{Task}s registered to be completed.
|
||||
-- Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.
|
||||
@@ -577,9 +590,7 @@ end
|
||||
function MISSION:AddTask( Task )
|
||||
|
||||
local TaskName = Task:GetTaskName()
|
||||
self:E( { "==> Adding TASK ", MissionName = self:GetName(), TaskName = TaskName } )
|
||||
|
||||
self.Tasks[TaskName] = self.Tasks[TaskName] or { n = 0 }
|
||||
self:I( { "==> Adding TASK ", MissionName = self:GetName(), TaskName = TaskName } )
|
||||
|
||||
self.Tasks[TaskName] = Task
|
||||
|
||||
@@ -588,6 +599,7 @@ function MISSION:AddTask( Task )
|
||||
return Task
|
||||
end
|
||||
|
||||
|
||||
--- Removes a @{Task} to be completed within the @{Mission}.
|
||||
-- Note that there can be multiple @{Task}s registered to be completed.
|
||||
-- Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.
|
||||
@@ -597,7 +609,7 @@ end
|
||||
function MISSION:RemoveTask( Task )
|
||||
|
||||
local TaskName = Task:GetTaskName()
|
||||
self:E( { "<== Removing TASK ", MissionName = self:GetName(), TaskName = TaskName } )
|
||||
self:I( { "<== Removing TASK ", MissionName = self:GetName(), TaskName = TaskName } )
|
||||
|
||||
self:F( TaskName )
|
||||
self.Tasks[TaskName] = self.Tasks[TaskName] or { n = 0 }
|
||||
@@ -613,21 +625,6 @@ function MISSION:RemoveTask( Task )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Return the next @{Task} ID to be completed within the @{Mission}.
|
||||
-- @param #MISSION self
|
||||
-- @param Tasking.Task#TASK Task is the @{Task} object.
|
||||
-- @return Tasking.Task#TASK The task added.
|
||||
function MISSION:GetNextTaskID( Task )
|
||||
|
||||
local TaskName = Task:GetTaskName()
|
||||
self:F( TaskName )
|
||||
self.Tasks[TaskName] = self.Tasks[TaskName] or { n = 0 }
|
||||
|
||||
self.Tasks[TaskName].n = self.Tasks[TaskName].n + 1
|
||||
|
||||
return self.Tasks[TaskName].n
|
||||
end
|
||||
|
||||
--- Is the @{Mission} **COMPLETED**.
|
||||
-- @param #MISSION self
|
||||
-- @return #boolean
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- **Tasking** -- This module contains the TASK class, the main engine to run human taskings.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- **Tasking** -- Controls the information of a Task.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module TaskInfo
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- **Tasking** - The TASK_Protect models tasks for players to protect or capture specific zones.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions: MillerTime
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module TaskZoneCapture
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- **Tasking** - The TASK_A2A models tasks for players in Air to Air engagements.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task_A2A
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
--
|
||||
-- The @{#TASK_A2A_DISPATCHER} classes implement the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task_A2A_Dispatcher
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
--- **Tasking** - The TASK_A2G models tasks for players in Air to Ground engagements.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task_A2G
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
--- **Tasking** - The TASK\_A2G\_DISPATCHER dispatches A2G Tasks to Players based on enemy location detection.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task_A2G_Dispatcher
|
||||
|
||||
do -- TASK_A2G_DISPATCHER
|
||||
|
||||
--- TASK_A2G_DISPATCHER class.
|
||||
--- TASK\_A2G\_DISPATCHER class.
|
||||
-- @type TASK_A2G_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.
|
||||
@@ -367,20 +367,20 @@ do -- TASK_A2G_DISPATCHER
|
||||
-- - Overview reports, which are providing the essential information. It provides an overview of a greater thing, and may take a bit of time to read.
|
||||
-- - Detailed reports, which provide with very detailed information. It takes a bit longer to read those reports, so the display of those could be a bit longer.
|
||||
--
|
||||
-- # 2. TASK_A2G_DISPATCHER constructor
|
||||
-- # 2. TASK\_A2G\_DISPATCHER constructor
|
||||
--
|
||||
-- The @{#TASK_A2G_DISPATCHER.New}() method creates a new TASK_A2G_DISPATCHER instance.
|
||||
-- The @{#TASK_A2G_DISPATCHER.New}() method creates a new TASK\_A2G\_DISPATCHER instance.
|
||||
--
|
||||
-- # 3. Usage
|
||||
--
|
||||
-- To use the TASK\_A2G\_DISPATCHER class, you need:
|
||||
--
|
||||
-- - A @{CommandCenter} object.
|
||||
-- - A @{Mission} object.
|
||||
-- - A @{Detection} object.
|
||||
-- - A @{Task_A2G_Dispatcher} object.
|
||||
-- - A @{Set} of @{Group} objects that will detect the emeny.
|
||||
-- - A @{Set} ob @{Group} objects that will attack the enemy.
|
||||
-- - A @{CommandCenter} object. The master communication channel.
|
||||
-- - A @{Mission} object. Each task belongs to a Mission.
|
||||
-- - A @{Detection} object. There are several detection grouping methods to choose from.
|
||||
-- - A @{Task_A2G_Dispatcher} object. The master A2G task dispatcher.
|
||||
-- - A @{Set} of @{Group} objects that will detect the emeny, the RecceSet. This is attached to the @{Detection} object.
|
||||
-- - A @{Set} ob @{Group} objects that will attack the enemy, the AttackSet. This is attached to the @{Task_A2G_Dispatcher} object.
|
||||
--
|
||||
-- Below an example mission declaration that is defines a Task A2G Dispatcher object.
|
||||
--
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers.
|
||||
-- The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.
|
||||
@@ -14,13 +14,13 @@
|
||||
--
|
||||
-- * @{#TASK_CARGO_TRANSPORT}: Defines a task for a human player to transport a set of cargo between various zones.
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- ### Author: **Sven Van de Velde (FlightControl)**
|
||||
-- ### Author: **FlightControl**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ====
|
||||
-- ===
|
||||
--
|
||||
-- @module Task_Cargo
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- This module contains the TASK_PICKUP classes.
|
||||
--
|
||||
-- 1) @{#TASK_PICKUP} class, extends @{Task#TASK}
|
||||
-- ===================================================
|
||||
-- ===
|
||||
-- The @{#TASK_PICKUP} class defines a pickup task of a @{Set} of @{CARGO} objects defined within the mission.
|
||||
-- based on the tasking capabilities defined in @{Task#TASK}.
|
||||
-- The TASK_PICKUP is implemented using a @{Statemachine#FSM_TASK}, and has the following statuses:
|
||||
|
||||
Reference in New Issue
Block a user