diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index 2b2caa6d1..8e6a06e2b 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -122,13 +122,31 @@ -- * @{#BASE.Inherit}: Inherits from a class. -- * @{#BASE.GetParent}: Returns the parent object from the object it is handling, or nil if there is no parent object. -- --- Future --- ====== --- Further methods may be added to BASE whenever there is a need to make "overall" functions available within MOOSE. --- -- ==== -- --- ### Author: FlightControl +-- # **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. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming -- -- @module Base diff --git a/Moose Development/Moose/Core/Fsm.lua b/Moose Development/Moose/Core/Fsm.lua index 736c9c6e7..ac979ee6b 100644 --- a/Moose Development/Moose/Core/Fsm.lua +++ b/Moose Development/Moose/Core/Fsm.lua @@ -1,4 +1,5 @@ ---- This module contains the FSM class. +--- This module contains the FSM class and derived FSM_ classes. +-- -- This development is based on a state machine implementation made by Conroy Kyle. -- The state machine can be found here: https://github.com/kyleconroy/lua-state-machine -- @@ -7,13 +8,45 @@ -- -- === -- --- 1) @{Workflow#FSM} class, extends @{Core.Base#BASE} --- ============================================== +-- # 1) @{Core.Fsm#FSM} class, extends @{Core.Base#BASE} -- +-- A Finite State Machine (FSM) defines the rules of transitioning between various States triggered by Events. +-- * A **State** defines a moment in the process. +-- * An **Event** describes an action, that can be triggered both internally as externally in the FSM. An Event can be triggered Embedded or Delayed over time. +-- +-- -- 1.1) Add or remove objects from the FSM -- -------------------------------------------- +-- +-- ==== +-- +-- # **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. +-- +-- YYYY-MM-DD: CLASS:**NewFunction**( Params ) replaces CLASS:_OldFunction_( Params ) +-- YYYY-MM-DD: CLASS:**NewFunction( Params )** added +-- +-- Hereby the change log: +-- +-- * 2016-12-18: Released. +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * None. +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming +-- -- @module Fsm --- @author FlightControl do -- FSM diff --git a/Moose Development/Moose/Functional/Spawn.lua b/Moose Development/Moose/Functional/Spawn.lua index 2f6b0bec5..b5812fffa 100644 --- a/Moose Development/Moose/Functional/Spawn.lua +++ b/Moose Development/Moose/Functional/Spawn.lua @@ -1,7 +1,7 @@ --- This module contains the SPAWN class. -- --- 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} --- ============================================= +-- # 1) @{Functional.Spawn#SPAWN} class, extends @{Core.Base#BASE} +-- -- The @{#SPAWN} class allows to spawn dynamically new groups, based on pre-defined initialization settings, modifying the behaviour when groups are spawned. -- For each group to be spawned, within the mission editor, a group has to be created with the "late activation flag" set. We call this group the *"Spawn Template"* of the SPAWN object. -- A reference to this Spawn Template needs to be provided when constructing the SPAWN object, by indicating the name of the group within the mission editor in the constructor methods. @@ -24,8 +24,8 @@ -- * It is important to defined BEFORE you spawn new groups, a proper initialization of the SPAWN instance is done with the options you want to use. -- * When designing a mission, NEVER name groups using a "#" within the name of the group Spawn Template(s), or the SPAWN module logic won't work anymore. -- --- 1.1) SPAWN construction methods --- ------------------------------- +-- ## 1.1) SPAWN construction methods +-- -- Create a new SPAWN object with the @{#SPAWN.New}() or the @{#SPAWN.NewWithAlias}() methods: -- -- * @{#SPAWN.New}(): Creates a new SPAWN object taking the name of the group that represents the GROUP Template (definition). @@ -35,8 +35,8 @@ -- The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. -- So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient. -- --- 1.2) SPAWN initialization methods --- --------------------------------- +-- ## 1.2) SPAWN initialization methods +-- -- A spawn object will behave differently based on the usage of **initialization** methods, which all start with the **Init** prefix: -- -- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned. @@ -48,8 +48,8 @@ -- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius. -- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor. -- --- 1.3) SPAWN spawning methods --- --------------------------- +-- ## 1.3) SPAWN spawning methods +-- -- Groups can be spawned at different times and methods: -- -- * @{#SPAWN.Spawn}(): Spawn one new group based on the last spawned index. @@ -64,8 +64,8 @@ -- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object. -- You can use the @{GROUP} object to do further actions with the DCSGroup. -- --- 1.4) Retrieve alive GROUPs spawned by the SPAWN object --- ------------------------------------------------------ +-- ## 1.4) Retrieve alive GROUPs spawned by the SPAWN object +-- -- The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. -- Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. -- SPAWN provides methods to iterate through that internal GROUP object reference table: @@ -77,8 +77,8 @@ -- You can use the methods @{#SPAWN.GetFirstAliveGroup}() and sequently @{#SPAWN.GetNextAliveGroup}() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. -- The method @{#SPAWN.GetGroupFromIndex}() will return the GROUP object reference from the given Index, dead or alive... -- --- 1.5) SPAWN object cleaning --- -------------------------- +-- ## 1.5) SPAWN object cleaning +-- -- Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -- In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, -- and it may occur that no new groups are or can be spawned as limits are reached. @@ -89,8 +89,8 @@ -- This models AI that has succesfully returned to their airbase, to restart their combat activities. -- Check the @{#SPAWN.InitCleanUp}() for further info. -- --- 1.6) Catch the @{Group} spawn event in a callback function! --- ----------------------------------------------------------- +-- ## 1.6) Catch the @{Group} spawn event in a callback function! +-- -- When using the SpawnScheduled method, new @{Group}s are created following the schedule timing parameters. -- When a new @{Group} is spawned, you maybe want to execute actions with that group spawned at the spawn event. -- To SPAWN class supports this functionality through the @{#SPAWN.OnSpawnGroup}( **function( SpawnedGroup ) end ** ) method, which takes a function as a parameter that you can define locally. @@ -100,8 +100,7 @@ -- -- ==== -- --- **API CHANGE HISTORY** --- ====================== +-- # **API CHANGE HISTORY** -- -- The underlying change log documents the API changes. Please read this carefully. The following notation is used: -- @@ -177,8 +176,7 @@ -- -- === -- --- AUTHORS and CONTRIBUTIONS --- ========================= +-- # **AUTHORS and CONTRIBUTIONS** -- -- ### Contributions: -- @@ -188,7 +186,6 @@ -- -- * **FlightControl**: Design & Programming -- --- -- @module Spawn diff --git a/Moose Training/Presentations/Core/FSM/MOOSE - FSM.pptx b/Moose Training/Presentations/Core/FSM/MOOSE - FSM.pptx index 0a0405589..8d4a6afd8 100644 Binary files a/Moose Training/Presentations/Core/FSM/MOOSE - FSM.pptx and b/Moose Training/Presentations/Core/FSM/MOOSE - FSM.pptx differ