mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge docu changes (#1818)
* Documentation fixes. (#1810) Fix documentation references. Correct spelling errors. Remove empty whitespaces. Correct a single mis-spelled ZONE_BASE variable, see 'Core/Zone.lua' (variable "Sureface" -> "Surface", no references to mis-spelled "Sureface" throughout the codebase). Correct mis-spelling of "coaltion" in 'Functional/Mantis.lua', corrected to "coalition". * Documentation fixes. (#1811) Update documentation text and links. Fix spelling errors. Other minor adjustments where appropriate, such as remove whitespaces and format code. * Documentation fixes. (#1815) Minor documentation and code formatting fixes. This is mostly intended to have something re-trigger the documentation generation to see if the filename capitalization is resolved. * Code formatting preparation. (#1817) Use EmmyLuaCodeStyle that comes with "Lua" VS Code extension (https://marketplace.visualstudio.com/items?itemName=sumneko.lua). More features and configurability than LuaFormatter, and no need for additional extension (beyond "Lua"). Formatting file set up from default template with some tweaks to correspond to most common coding style observed in the code base. Further tweaks are likely required. * Documentation fixes. (#1816) Co-authored-by: TommyC81 <tommyc81@gmail.com>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
-- @image MOOSE.JPG
|
||||
|
||||
do -- TASK_MANAGER
|
||||
|
||||
|
||||
--- TASK_MANAGER class.
|
||||
-- @type TASK_MANAGER
|
||||
-- @field Core.Set#SET_GROUP SetGroup The set of group objects containing players for which tasks are managed.
|
||||
@@ -42,21 +42,21 @@ do -- TASK_MANAGER
|
||||
ClassName = "TASK_MANAGER",
|
||||
SetGroup = nil,
|
||||
}
|
||||
|
||||
|
||||
--- TASK\_MANAGER constructor.
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param Core.Set#SET_GROUP SetGroup The set of group objects containing players for which tasks are managed.
|
||||
-- @return #TASK_MANAGER self
|
||||
function TASK_MANAGER:New( SetGroup )
|
||||
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, FSM:New() ) -- #TASK_MANAGER
|
||||
|
||||
|
||||
self.SetGroup = SetGroup
|
||||
|
||||
|
||||
self:SetStartState( "Stopped" )
|
||||
self:AddTransition( "Stopped", "StartTasks", "Started" )
|
||||
|
||||
|
||||
--- StartTasks Handler OnBefore for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnBeforeStartTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -64,27 +64,25 @@ do -- TASK_MANAGER
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
|
||||
--- StartTasks Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterStartTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
|
||||
--- StartTasks Trigger for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] StartTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
|
||||
|
||||
--- StartTasks Asynchronous Trigger for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] __StartTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
|
||||
|
||||
self:AddTransition( "Started", "StopTasks", "Stopped" )
|
||||
|
||||
|
||||
--- StopTasks Handler OnBefore for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnBeforeStopTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -92,28 +90,27 @@ do -- TASK_MANAGER
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @return #boolean
|
||||
|
||||
|
||||
--- StopTasks Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterStopTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
|
||||
|
||||
--- StopTasks Trigger for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] StopTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
|
||||
|
||||
--- StopTasks Asynchronous Trigger for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] __StopTasks
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param #number Delay
|
||||
|
||||
|
||||
self:AddTransition( "Started", "Manage", "Started" )
|
||||
|
||||
self:AddTransition( "Started", "Success", "Started" )
|
||||
|
||||
|
||||
--- Success Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterSuccess
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -121,10 +118,9 @@ do -- TASK_MANAGER
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @param Tasking.Task#TASK Task
|
||||
|
||||
|
||||
|
||||
self:AddTransition( "Started", "Failed", "Started" )
|
||||
|
||||
|
||||
--- Failed Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterFailed
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -132,10 +128,9 @@ do -- TASK_MANAGER
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @param Tasking.Task#TASK Task
|
||||
|
||||
|
||||
|
||||
self:AddTransition( "Started", "Aborted", "Started" )
|
||||
|
||||
|
||||
--- Aborted Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterAborted
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -143,9 +138,9 @@ do -- TASK_MANAGER
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @param Tasking.Task#TASK Task
|
||||
|
||||
|
||||
self:AddTransition( "Started", "Cancelled", "Started" )
|
||||
|
||||
|
||||
--- Cancelled Handler OnAfter for TASK_MANAGER
|
||||
-- @function [parent=#TASK_MANAGER] OnAfterCancelled
|
||||
-- @param #TASK_MANAGER self
|
||||
@@ -155,37 +150,37 @@ do -- TASK_MANAGER
|
||||
-- @param Tasking.Task#TASK Task
|
||||
|
||||
self:SetRefreshTimeInterval( 30 )
|
||||
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function TASK_MANAGER:onafterStartTasks( From, Event, To )
|
||||
self:Manage()
|
||||
end
|
||||
|
||||
|
||||
function TASK_MANAGER:onafterManage( From, Event, To )
|
||||
|
||||
self:__Manage( -self._RefreshTimeInterval )
|
||||
|
||||
self:ManageTasks()
|
||||
end
|
||||
|
||||
|
||||
--- Set the refresh time interval in seconds when a new task management action needs to be done.
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @param #number RefreshTimeInterval The refresh time interval in seconds when a new task management action needs to be done.
|
||||
-- @return #TASK_MANAGER self
|
||||
function TASK_MANAGER:SetRefreshTimeInterval( RefreshTimeInterval )
|
||||
self:F2()
|
||||
|
||||
|
||||
self._RefreshTimeInterval = RefreshTimeInterval
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Manages the tasks for the @{Core.Set#SET_GROUP}.
|
||||
-- @param #TASK_MANAGER self
|
||||
-- @return #TASK_MANAGER self
|
||||
function TASK_MANAGER:ManageTasks()
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user