diff --git a/Moose Development/Moose/AI/AI_Balancer.lua b/Moose Development/Moose/AI/AI_Balancer.lua index f443fea20..75a1c5a2c 100644 --- a/Moose Development/Moose/AI/AI_Balancer.lua +++ b/Moose Development/Moose/AI/AI_Balancer.lua @@ -1,35 +1,35 @@ ---- This module contains the AIBALANCER class. +--- This module contains the AI_BALANCER class. -- -- === -- --- 1) @{AI.AI_Balancer#AIBALANCER} class, extends @{Core.Fsm#FSM_SET} +-- 1) @{AI.AI_Balancer#AI_BALANCER} class, extends @{Core.Fsm#FSM_SET} -- =================================================================================== --- The @{AI.AI_Balancer#AIBALANCER} class monitors and manages as many AI GROUPS as there are +-- The @{AI.AI_Balancer#AI_BALANCER} class monitors and manages as many AI GROUPS as there are -- CLIENTS in a SET_CLIENT collection not occupied by players. --- The AIBALANCER class manages internally a collection of AI management objects, which govern the behaviour +-- The AI_BALANCER class manages internally a collection of AI management objects, which govern the behaviour -- of the underlying AI GROUPS. -- -- The parent class @{Core.Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM) -- and calls for each event the state transition methods providing the internal @{Core.Fsm#FSM_SET.Set} object containing the -- SET_GROUP and additional event parameters provided during the event. -- --- 1.1) AIBALANCER construction method +-- 1.1) AI_BALANCER construction method -- --------------------------------------- --- Create a new AIBALANCER object with the @{#AIBALANCER.New} method: +-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New} method: -- --- * @{#AIBALANCER.New}: Creates a new AIBALANCER object. +-- * @{#AI_BALANCER.New}: Creates a new AI_BALANCER object. -- -- 1.2) -- ---- -- * Add -- * Remove -- --- 1.2) AIBALANCER returns AI to Airbases +-- 1.2) AI_BALANCER returns AI to Airbases -- ------------------------------------------ -- You can configure to have the AI to return to: -- --- * @{#AIBALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- * @{#AIBALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. -- -- -- === -- @@ -56,12 +56,12 @@ -- ### Contributions: -- -- * **Dutch_Baron (James)**: Who you can search on the Eagle Dynamics Forums. --- Working together with James has resulted in the creation of the AIBALANCER class. +-- Working together with James has resulted in the creation of the AI_BALANCER class. -- James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) -- -- * **SNAFU**: -- Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. --- None of the script code has been used however within the new AIBALANCER moose class. +-- None of the script code has been used however within the new AI_BALANCER moose class. -- -- ### Authors: -- @@ -71,24 +71,24 @@ ---- AIBALANCER class --- @type AIBALANCER +--- AI_BALANCER class +-- @type AI_BALANCER -- @field Core.Set#SET_CLIENT SetClient -- @extends Core.Fsm#FSM_SET -AIBALANCER = { - ClassName = "AIBALANCER", +AI_BALANCER = { + ClassName = "AI_BALANCER", PatrolZones = {}, AIGroups = {}, } ---- Creates a new AIBALANCER object --- @param #AIBALANCER self +--- Creates a new AI_BALANCER object +-- @param #AI_BALANCER self -- @param Core.Set#SET_CLIENT SetClient A SET\_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player). -- @param Functional.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed. --- @return #AIBALANCER +-- @return #AI_BALANCER -- @usage --- -- Define a new AIBALANCER Object. -function AIBALANCER:New( SetClient, SpawnAI ) +-- -- Define a new AI_BALANCER Object. +function AI_BALANCER:New( SetClient, SpawnAI ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_SET:New( SET_GROUP:New() ) ) -- Core.Fsm#FSM_SET @@ -116,10 +116,10 @@ function AIBALANCER:New( SetClient, SpawnAI ) end --- Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Core.Set#SET_AIRBASE}s to evaluate where to return to. -function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) +function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) self.ToNearestAirbase = true self.ReturnTresholdRange = ReturnTresholdRange @@ -127,19 +127,19 @@ function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseS end --- Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -function AIBALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) +function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) self.ToHomeAirbase = true self.ReturnTresholdRange = ReturnTresholdRange end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -153,18 +153,18 @@ function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) self:Spawned( AIGroup ) end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) AIGroup:Destroy() end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then @@ -187,8 +187,8 @@ function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) end ---- @param #AIBALANCER self -function AIBALANCER:onenterMonitoring( SetGroup ) +--- @param #AI_BALANCER self +function AI_BALANCER:onenterMonitoring( SetGroup ) self.SetClient:ForEachClient( --- @param Wrapper.Client#CLIENT Client diff --git a/Moose Development/Moose/AI/AI_Cargo.lua b/Moose Development/Moose/AI/AI_Cargo.lua index f76a753c4..5c3da2180 100644 --- a/Moose Development/Moose/AI/AI_Cargo.lua +++ b/Moose Development/Moose/AI/AI_Cargo.lua @@ -4,31 +4,31 @@ -- -- Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ): -- --- * CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. +-- * AI_CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. -- * CARGO_STATIC, represented by a @{Static}: Cargo can be represented by a Static. Destruction of the Static will mean that the cargo is lost. --- * CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. --- * CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. +-- * AI_CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. +-- * AI_CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. -- * CARGO_SLINGLOAD, represented by a @{Cargo} that is transportable: Cargo can be represented by a Cargo object that is transportable. Destruction of the Cargo will mean that the cargo is lost. -- --- * CARGO_GROUPED, represented by a Group of CARGO_UNITs. +-- * AI_CARGO_GROUPED, represented by a Group of CARGO_UNITs. -- --- 1) @{AI.AI_Cargo#CARGO_BASE} class, extends @{Core.Fsm#FSM_PROCESS} +-- 1) @{AI.AI_Cargo#AI_CARGO} class, extends @{Core.Fsm#FSM_PROCESS} -- ========================================================================== --- The @{#CARGO_BASE} class defines the core functions that defines a cargo object within MOOSE. +-- The @{#AI_CARGO} class defines the core functions that defines a cargo object within MOOSE. -- A cargo is a logical object defined that is available for transport, and has a life status within a simulation. -- --- The CARGO_BASE is a state machine: it manages the different events and states of the cargo. --- All derived classes from CARGO_BASE follow the same state machine, expose the same cargo event functions, and provide the same cargo states. +-- The AI_CARGO is a state machine: it manages the different events and states of the cargo. +-- All derived classes from AI_CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states. -- --- ## 1.2.1) CARGO_BASE Events: +-- ## 1.2.1) AI_CARGO Events: -- --- * @{#CARGO_BASE.Board}( ToCarrier ): Boards the cargo to a carrier. --- * @{#CARGO_BASE.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. --- * @{#CARGO_BASE.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. --- * @{#CARGO_BASE.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. --- * @{#CARGO_BASE.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. +-- * @{#AI_CARGO.Board}( ToCarrier ): Boards the cargo to a carrier. +-- * @{#AI_CARGO.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. +-- * @{#AI_CARGO.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. +-- * @{#AI_CARGO.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. +-- * @{#AI_CARGO.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. -- --- ## 1.2.2) CARGO_BASE States: +-- ## 1.2.2) AI_CARGO States: -- -- * **UnLoaded**: The cargo is unloaded from a carrier. -- * **Boarding**: The cargo is currently boarding (= running) into a carrier. @@ -37,7 +37,7 @@ -- * **Dead**: The cargo is dead ... -- * **End**: The process has come to an end. -- --- ## 1.2.3) CARGO_BASE state transition methods: +-- ## 1.2.3) AI_CARGO state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -52,15 +52,15 @@ -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- 2) #CARGO_UNIT class +-- 2) #AI_CARGO_UNIT class -- ==================== --- The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- --- 5) #CARGO_GROUPED class +-- 5) #AI_CARGO_GROUPED class -- ======================= --- The CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- -- This module is still under construction, but is described above works already, and will keep working ... -- @@ -72,14 +72,14 @@ --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Board +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Board +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -88,14 +88,14 @@ --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnBoard +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnBoard +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. @@ -104,14 +104,14 @@ --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Load +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Load +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -120,14 +120,14 @@ --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnLoad +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnLoad +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. @@ -135,46 +135,46 @@ -- UnLoaded ---- @function [parent=#CARGO_BASE] OnBeforeUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Loaded ---- @function [parent=#CARGO_BASE] OnBeforeLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Boarding ---- @function [parent=#CARGO_BASE] OnBeforeBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- UnBoarding ---- @function [parent=#CARGO_BASE] OnBeforeUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable @@ -182,9 +182,9 @@ CARGOS = {} -do -- CARGO_BASE +do -- AI_CARGO - --- @type CARGO_BASE + --- @type AI_CARGO -- @extends Core.Fsm#FSM_PROCESS -- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers. -- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo. @@ -197,8 +197,8 @@ do -- CARGO_BASE -- @field #boolean Moveable This flag defines if the cargo is moveable. -- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit. -- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit. - CARGO_BASE = { - ClassName = "CARGO_BASE", + AI_CARGO = { + ClassName = "AI_CARGO", Type = nil, Name = nil, Weight = nil, @@ -210,19 +210,19 @@ do -- CARGO_BASE Containable = false, } ---- @type CARGO_BASE.CargoObjects +--- @type AI_CARGO.CargoObjects -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. ---- CARGO_BASE Constructor. This class is an abstract class and should not be instantiated. --- @param #CARGO_BASE self +--- AI_CARGO Constructor. This class is an abstract class and should not be instantiated. +-- @param #AI_CARGO self -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_BASE -function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) +-- @return #AI_CARGO +function AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) local self = BASE:Inherit( self, FSM:New() ) -- Core.Fsm#FSM_CONTROLLABLE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) @@ -259,20 +259,20 @@ function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) end ---- Template method to spawn a new representation of the CARGO_BASE in the simulator. --- @param #CARGO_BASE self --- @return #CARGO_BASE -function CARGO_BASE:Spawn( PointVec2 ) +--- Template method to spawn a new representation of the AI_CARGO in the simulator. +-- @param #AI_CARGO self +-- @return #AI_CARGO +function AI_CARGO:Spawn( PointVec2 ) self:F() end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_BASE self +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 PointVec2 -- @return #boolean -function CARGO_BASE:IsNear( PointVec2 ) +function AI_CARGO:IsNear( PointVec2 ) self:F( { PointVec2 } ) local Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() ) @@ -287,36 +287,36 @@ end end -do -- CARGO_REPRESENTABLE +do -- AI_CARGO_REPRESENTABLE - --- @type CARGO_REPRESENTABLE - -- @extends #CARGO_BASE - CARGO_REPRESENTABLE = { - ClassName = "CARGO_REPRESENTABLE" + --- @type AI_CARGO_REPRESENTABLE + -- @extends #AI_CARGO + AI_CARGO_REPRESENTABLE = { + ClassName = "AI_CARGO_REPRESENTABLE" } ---- CARGO_REPRESENTABLE Constructor. --- @param #CARGO_REPRESENTABLE self +--- AI_CARGO_REPRESENTABLE Constructor. +-- @param #AI_CARGO_REPRESENTABLE self -- @param Wrapper.Controllable#Controllable CargoObject -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_BASE +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) return self end --- Route a cargo unit to a PointVec2. --- @param #CARGO_REPRESENTABLE self +-- @param #AI_CARGO_REPRESENTABLE self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #number Speed --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) self:F2( ToPointVec2 ) local Points = {} @@ -331,27 +331,27 @@ function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) return self end -end -- CARGO_BASE +end -- AI_CARGO -do -- CARGO_UNIT +do -- AI_CARGO_UNIT - --- @type CARGO_UNIT - -- @extends #CARGO_REPRESENTABLE - CARGO_UNIT = { - ClassName = "CARGO_UNIT" + --- @type AI_CARGO_UNIT + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_UNIT = { + ClassName = "AI_CARGO_UNIT" } ---- CARGO_UNIT Constructor. --- @param #CARGO_UNIT self +--- AI_CARGO_UNIT Constructor. +-- @param #AI_CARGO_UNIT self -- @param Wrapper.Unit#UNIT CargoUnit -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_UNIT -function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_UNIT +-- @return #AI_CARGO_UNIT +function AI_CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_UNIT self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoUnit ) @@ -363,12 +363,12 @@ function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius end --- Enter UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Angle = 180 @@ -408,12 +408,12 @@ function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -432,12 +432,12 @@ function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -457,12 +457,12 @@ end --- Enter UnLoaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -495,12 +495,12 @@ end --- Enter Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Speed = 10 @@ -527,12 +527,12 @@ function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then @@ -545,12 +545,12 @@ function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Loaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -564,11 +564,11 @@ end --- Board Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -function CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -585,25 +585,25 @@ end end -do -- CARGO_PACKAGE +do -- AI_CARGO_PACKAGE - --- @type CARGO_PACKAGE - -- @extends #CARGO_REPRESENTABLE - CARGO_PACKAGE = { - ClassName = "CARGO_PACKAGE" + --- @type AI_CARGO_PACKAGE + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_PACKAGE = { + ClassName = "AI_CARGO_PACKAGE" } ---- CARGO_PACKAGE Constructor. --- @param #CARGO_PACKAGE self +--- AI_CARGO_PACKAGE Constructor. +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier The UNIT carrying the package. -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_PACKAGE -function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_PACKAGE +-- @return #AI_CARGO_PACKAGE +function AI_CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_PACKAGE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoCarrier ) @@ -613,7 +613,7 @@ function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, Near end --- Board Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -621,7 +621,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -651,10 +651,10 @@ function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, Boa end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier -- @return #boolean -function CARGO_PACKAGE:IsNear( CargoCarrier ) +function AI_CARGO_PACKAGE:IsNear( CargoCarrier ) self:F() local CargoCarrierPoint = CargoCarrier:GetPointVec2() @@ -670,12 +670,12 @@ function CARGO_PACKAGE:IsNear( CargoCarrier ) end --- Boarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -686,7 +686,7 @@ function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, B end --- UnBoard Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -695,7 +695,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -728,12 +728,12 @@ function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnL end --- UnBoarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -744,7 +744,7 @@ function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) end --- Load Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -752,7 +752,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -772,13 +772,13 @@ function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDi end --- UnLoad Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param #number Distance -- @param #number Angle -function CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -800,27 +800,27 @@ end end -do -- CARGO_GROUP +do -- AI_CARGO_GROUP - --- @type CARGO_GROUP - -- @extends AI.AI_Cargo#CARGO_BASE + --- @type AI_CARGO_GROUP + -- @extends AI.AI_Cargo#AI_CARGO -- @field Set#SET_BASE CargoSet A set of cargo objects. -- @field #string Name A string defining the name of the cargo group. The name is the unique identifier of the cargo. - CARGO_GROUP = { - ClassName = "CARGO_GROUP", + AI_CARGO_GROUP = { + ClassName = "AI_CARGO_GROUP", } ---- CARGO_GROUP constructor. --- @param #CARGO_GROUP self +--- AI_CARGO_GROUP constructor. +-- @param #AI_CARGO_GROUP self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUP -function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #CARGO_GROUP +-- @return #AI_CARGO_GROUP +function AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUP self:F( { Type, Name, ReportRadius, NearRadius } ) self.CargoSet = CargoSet @@ -829,44 +829,44 @@ function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) return self end -end -- CARGO_GROUP +end -- AI_CARGO_GROUP -do -- CARGO_GROUPED +do -- AI_CARGO_GROUPED - --- @type CARGO_GROUPED - -- @extends AI.AI_Cargo#CARGO_GROUP - CARGO_GROUPED = { - ClassName = "CARGO_GROUPED", + --- @type AI_CARGO_GROUPED + -- @extends AI.AI_Cargo#AI_CARGO_GROUP + AI_CARGO_GROUPED = { + ClassName = "AI_CARGO_GROUPED", } ---- CARGO_GROUPED constructor. --- @param #CARGO_GROUPED self +--- AI_CARGO_GROUPED constructor. +-- @param #AI_CARGO_GROUPED self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUPED -function CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #CARGO_GROUPED +-- @return #AI_CARGO_GROUPED +function AI_CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUPED self:F( { Type, Name, ReportRadius, NearRadius } ) return self end --- Enter Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__Board( 1, CargoCarrier ) @@ -879,16 +879,16 @@ function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) end --- Enter Loaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, load each cargo to the CargoCarrier. + -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do Cargo:Load( CargoCarrier ) end @@ -896,17 +896,17 @@ function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Boarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "Loaded" ) then @@ -923,19 +923,19 @@ function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Enter UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Timer = 1 if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__UnBoard( Timer, ToPointVec2 ) @@ -949,12 +949,12 @@ function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -964,7 +964,7 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) if From == "UnBoarding" then local UnBoarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "UnLoaded" ) then @@ -984,12 +984,12 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self:__UnLoad( 1, ToPointVec2 ) @@ -998,17 +998,17 @@ end --- Enter UnLoaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:UnLoad( ToPointVec2 ) @@ -1019,7 +1019,7 @@ function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) end -end -- CARGO_GROUPED +end -- AI_CARGO_GROUPED diff --git a/Moose Development/Moose/AI/AI_Patrol.lua b/Moose Development/Moose/AI/AI_Patrol.lua index 3a76374b2..6781fe964 100644 --- a/Moose Development/Moose/AI/AI_Patrol.lua +++ b/Moose Development/Moose/AI/AI_Patrol.lua @@ -2,9 +2,9 @@ -- -- === -- --- 1) @{#PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} +-- 1) @{#AI_PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} -- ================================================================ --- The @{#PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. +-- The @{#AI_PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. -- The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, -- a random point is selected as the route point within the 3D space, within the given boundary limits. -- The airplane will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. @@ -12,24 +12,24 @@ -- This cycle will continue until a fuel treshold has been reached by the airplane. -- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land. -- --- 1.1) PATROLZONE constructor: +-- 1.1) AI_PATROLZONE constructor: -- ---------------------------- -- --- * @{#PATROLZONE.New}(): Creates a new PATROLZONE object. +-- * @{#AI_PATROLZONE.New}(): Creates a new AI_PATROLZONE object. -- --- 1.2) PATROLZONE state machine: +-- 1.2) AI_PATROLZONE state machine: -- ---------------------------------- --- The PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. +-- The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. -- --- ### 1.2.1) PATROLZONE Events: +-- ### 1.2.1) AI_PATROLZONE Events: -- --- * @{#PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. --- * @{#PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. --- * @{#PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. --- * @{#PATROLZONE.End}( AIControllable ): The end of the PATROLZONE process. --- * @{#PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The PATROLZONE process will be ended. +-- * @{#AI_PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. +-- * @{#AI_PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. +-- * @{#AI_PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. +-- * @{#AI_PATROLZONE.End}( AIControllable ): The end of the AI_PATROLZONE process. +-- * @{#AI_PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The AI_PATROLZONE process will be ended. -- --- ### 1.2.2) PATROLZONE States: +-- ### 1.2.2) AI_PATROLZONE States: -- -- * **Route**: A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. -- * **Patrol**: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used. @@ -37,7 +37,7 @@ -- * **Dead**: The AIControllable is dead ... -- * **End**: The process has come to an end. -- --- ### 1.2.3) PATROLZONE state transition methods: +-- ### 1.2.3) AI_PATROLZONE state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -52,7 +52,7 @@ -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- An example how to manage a state transition for an PATROLZONE object **Patrol** for the state **RTB**: +-- An example how to manage a state transition for an AI_PATROLZONE object **Patrol** for the state **RTB**: -- -- local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" ) -- local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) @@ -60,46 +60,46 @@ -- local PatrolSpawn = SPAWN:New( "Patrol Group" ) -- local PatrolGroup = PatrolSpawn:Spawn() -- --- local Patrol = PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) +-- local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) -- Patrol:SetControllable( PatrolGroup ) -- Patrol:ManageFuel( 0.2, 60 ) -- --- **OnBefore**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the PATROLZONE object. +-- **OnBefore**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #boolean If false is returned, then the OnAfter state transition method will not be called. -- function Patrol:OnBeforeRTB( AIGroup ) -- AIGroup:MessageToRed( "Returning to base", 20 ) -- end -- --- **OnAfter**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the PATROLZONE object. +-- **OnAfter**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone. -- function Patrol:OnAfterRTB( AIGroup ) -- return PatrolSpawn:Spawn() -- end -- --- 1.3) Manage the PATROLZONE parameters: +-- 1.3) Manage the AI_PATROLZONE parameters: -- ------------------------------------------ --- The following methods are available to modify the parameters of a PATROLZONE object: +-- The following methods are available to modify the parameters of a AI_PATROLZONE object: -- --- * @{#PATROLZONE.SetControllable}(): Set the AIControllable. --- * @{#PATROLZONE.GetControllable}(): Get the AIControllable. --- * @{#PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. --- * @{#PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetControllable}(): Set the AIControllable. +-- * @{#AI_PATROLZONE.GetControllable}(): Get the AIControllable. +-- * @{#AI_PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. -- --- 1.3) Manage the out of fuel in the PATROLZONE: +-- 1.3) Manage the out of fuel in the AI_PATROLZONE: -- ---------------------------------------------- -- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- Use the method @{#PATROLZONE.ManageFuel}() to have this proces in place. +-- Use the method @{#AI_PATROLZONE.ManageFuel}() to have this proces in place. -- -- ==== -- @@ -135,20 +135,20 @@ -- State Transition Functions --- OnBefore State Transition Function --- @function [parent=#PATROLZONE] OnBeforeRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnBeforeRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean --- OnAfter State Transition Function --- @function [parent=#PATROLZONE] OnAfterRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnAfterRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable ---- PATROLZONE class --- @type PATROLZONE +--- AI_PATROLZONE class +-- @type AI_PATROLZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @field Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. @@ -156,26 +156,26 @@ -- @field Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @field Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. -- @extends Core.Fsm#FSM_CONTROLLABLE -PATROLZONE = { - ClassName = "PATROLZONE", +AI_PATROLZONE = { + ClassName = "AI_PATROLZONE", } ---- Creates a new PATROLZONE object --- @param #PATROLZONE self +--- Creates a new AI_PATROLZONE object +-- @param #AI_PATROLZONE self -- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self +-- @return #AI_PATROLZONE self -- @usage --- -- Define a new PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. +-- -- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. -- PatrolZone = ZONE:New( 'PatrolZone' ) -- PatrolSpawn = SPAWN:New( 'Patrol Group' ) --- PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) -function PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) +-- PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) +function AI_PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_CONTROLLABLE:New() ) -- Core.Fsm#FSM_CONTROLLABLE @@ -201,11 +201,11 @@ end --- Sets (modifies) the minimum and maximum speed of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self -function PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) self:F2( { PatrolMinSpeed, PatrolMaxSpeed } ) self.PatrolMinSpeed = PatrolMinSpeed @@ -215,11 +215,11 @@ end --- Sets the floor and ceiling altitude of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. --- @return #PATROLZONE self -function PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) self:F2( { PatrolFloorAltitude, PatrolCeilingAltitude } ) self.PatrolFloorAltitude = PatrolFloorAltitude @@ -232,7 +232,7 @@ end function _NewPatrolRoute( AIControllable ) AIControllable:T( "NewPatrolRoute" ) - local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#PATROLZONE + local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#AI_PATROLZONE PatrolZone:__Route( 1 ) end @@ -241,13 +241,13 @@ end --- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel. -- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base. --- @return #PATROLZONE self -function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) self.PatrolManageFuel = true self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage @@ -257,9 +257,9 @@ function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrb end --- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. --- @param #PATROLZONE self --- @return #PATROLZONE self -function PATROLZONE:onenterRoute() +-- @param #AI_PATROLZONE self +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:onenterRoute() self:F2() @@ -354,8 +354,8 @@ function PATROLZONE:onenterRoute() end ---- @param #PATROLZONE self -function PATROLZONE:onenterPatrol() +--- @param #AI_PATROLZONE self +function AI_PATROLZONE:onenterPatrol() self:F2() if self.Controllable and self.Controllable:IsAlive() then diff --git a/Moose Development/Moose/Tasking/Task_AIBalancer.lua b/Moose Development/Moose/Tasking/Task_AIBalancer.lua index 43056420f..d68c991f8 100644 --- a/Moose Development/Moose/Tasking/Task_AIBalancer.lua +++ b/Moose Development/Moose/Tasking/Task_AIBalancer.lua @@ -1,29 +1,29 @@ ---- This module contains the AIBALANCER class. +--- This module contains the AI_BALANCER class. -- -- === -- --- 1) @{AI.AI_Balancer#AIBALANCER} class, extends @{Core.Base#BASE} +-- 1) @{AI.AI_Balancer#AI_BALANCER} class, extends @{Core.Base#BASE} -- ======================================================= --- The @{AI.AI_Balancer#AIBALANCER} class controls the dynamic spawning of AI GROUPS depending on a SET_CLIENT. +-- The @{AI.AI_Balancer#AI_BALANCER} class controls the dynamic spawning of AI GROUPS depending on a SET_CLIENT. -- There will be as many AI GROUPS spawned as there at CLIENTS in SET_CLIENT not spawned. --- The AI_Balancer uses the @{PatrolCore.Zone#PATROLZONE} class to make AI patrol an zone until the fuel treshold is reached. +-- The AI_Balancer uses the @{PatrolCore.Zone#AI_PATROLZONE} class to make AI patrol an zone until the fuel treshold is reached. -- --- 1.1) AIBALANCER construction method: +-- 1.1) AI_BALANCER construction method: -- ------------------------------------ --- Create a new AIBALANCER object with the @{#AIBALANCER.New} method: +-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New} method: -- --- * @{#AIBALANCER.New}: Creates a new AIBALANCER object. +-- * @{#AI_BALANCER.New}: Creates a new AI_BALANCER object. -- --- 1.2) AIBALANCER returns AI to Airbases: +-- 1.2) AI_BALANCER returns AI to Airbases: -- --------------------------------------- -- You can configure to have the AI to return to: -- --- * @{#AIBALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- * @{#AIBALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. -- --- 1.3) AIBALANCER allows AI to patrol specific zones: +-- 1.3) AI_BALANCER allows AI to patrol specific zones: -- --------------------------------------------------- --- Use @{AI.AI_Balancer#AIBALANCER.SetPatrolZone}() to specify a zone where the AI needs to patrol. +-- Use @{AI.AI_Balancer#AI_BALANCER.SetPatrolZone}() to specify a zone where the AI needs to patrol. -- -- === -- @@ -50,12 +50,12 @@ -- ### Contributions: -- -- * **Dutch_Baron (James)**: Who you can search on the Eagle Dynamics Forums. --- Working together with James has resulted in the creation of the AIBALANCER class. +-- Working together with James has resulted in the creation of the AI_BALANCER class. -- James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) -- -- * **SNAFU**: -- Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. --- None of the script code has been used however within the new AIBALANCER moose class. +-- None of the script code has been used however within the new AI_BALANCER moose class. -- -- ### Authors: -- @@ -65,28 +65,28 @@ ---- AIBALANCER class --- @type AIBALANCER +--- AI_BALANCER class +-- @type AI_BALANCER -- @field Core.Set#SET_CLIENT SetClient -- @field Functional.Spawn#SPAWN SpawnAI -- @field #boolean ToNearestAirbase -- @field Core.Set#SET_AIRBASE ReturnAirbaseSet -- @field Dcs.DCSTypes#Distance ReturnTresholdRange -- @field #boolean ToHomeAirbase --- @field PatrolCore.Zone#PATROLZONE PatrolZone +-- @field PatrolCore.Zone#AI_PATROLZONE PatrolZone -- @extends Core.Base#BASE -AIBALANCER = { - ClassName = "AIBALANCER", +AI_BALANCER = { + ClassName = "AI_BALANCER", PatrolZones = {}, AIGroups = {}, } ---- Creates a new AIBALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. --- @param #AIBALANCER self +--- Creates a new AI_BALANCER object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names. +-- @param #AI_BALANCER self -- @param SetClient A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player). -- @param SpawnAI A SPAWN object that will spawn the AI units required, balancing the SetClient. --- @return #AIBALANCER self -function AIBALANCER:New( SetClient, SpawnAI ) +-- @return #AI_BALANCER self +function AI_BALANCER:New( SetClient, SpawnAI ) -- Inherits from BASE local self = BASE:Inherit( self, BASE:New() ) @@ -122,10 +122,10 @@ function AIBALANCER:New( SetClient, SpawnAI ) end --- Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Core.Set#SET_AIRBASE}s to evaluate where to return to. -function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) +function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) self.ToNearestAirbase = true self.ReturnTresholdRange = ReturnTresholdRange @@ -133,21 +133,21 @@ function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseS end --- Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -function AIBALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) +function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) self.ToHomeAirbase = true self.ReturnTresholdRange = ReturnTresholdRange end --- Let the AI patrol a @{Zone} with a given Speed range and Altitude range. --- @param #AIBALANCER self --- @param PatrolCore.Zone#PATROLZONE PatrolZone The @{PatrolZone} where the AI needs to patrol. --- @return PatrolCore.Zone#PATROLZONE self -function AIBALANCER:SetPatrolZone( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) +-- @param #AI_BALANCER self +-- @param PatrolCore.Zone#AI_PATROLZONE PatrolZone The @{PatrolZone} where the AI needs to patrol. +-- @return PatrolCore.Zone#AI_PATROLZONE self +function AI_BALANCER:SetPatrolZone( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) - self.PatrolZone = PATROLZONE:New( + self.PatrolZone = AI_PATROLZONE:New( self.SpawnAI, PatrolZone, PatrolFloorAltitude, @@ -158,17 +158,17 @@ function AIBALANCER:SetPatrolZone( PatrolZone, PatrolFloorAltitude, PatrolCeilin end --- Get the @{PatrolZone} object assigned by the @{AI_Balancer} object. --- @param #AIBALANCER self --- @return PatrolCore.Zone#PATROLZONE PatrolZone The @{PatrolZone} where the AI needs to patrol. -function AIBALANCER:GetPatrolZone() +-- @param #AI_BALANCER self +-- @return PatrolCore.Zone#AI_PATROLZONE PatrolZone The @{PatrolZone} where the AI needs to patrol. +function AI_BALANCER:GetPatrolZone() return self.PatrolZone end ---- @param #AIBALANCER self -function AIBALANCER:_ClientAliveMonitorScheduler() +--- @param #AI_BALANCER self +function AI_BALANCER:_ClientAliveMonitorScheduler() self.SetClient:ForEachClient( --- @param Wrapper.Client#CLIENT Client @@ -255,7 +255,7 @@ function AIBALANCER:_ClientAliveMonitorScheduler() --- Now test if the AIGroup needs to patrol a zone, otherwise let it follow its route... if self.PatrolZone then - self.PatrolZones[#self.PatrolZones+1] = PATROLZONE:New( + self.PatrolZones[#self.PatrolZones+1] = AI_PATROLZONE:New( self.PatrolZone.PatrolZone, self.PatrolZone.PatrolFloorAltitude, self.PatrolZone.PatrolCeilingAltitude, diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua index b1d605373..ac46b458e 100644 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20161216_1630' ) +env.info( 'Moose Generation Timestamp: 20161216_1640' ) local base = _G Include = {} @@ -23723,38 +23723,38 @@ function DETECTION_AREAS:CreateDetectionSets() end ---- This module contains the AIBALANCER class. +--- This module contains the AI_BALANCER class. -- -- === -- --- 1) @{AI.AI_Balancer#AIBALANCER} class, extends @{Core.Fsm#FSM_SET} +-- 1) @{AI.AI_Balancer#AI_BALANCER} class, extends @{Core.Fsm#FSM_SET} -- =================================================================================== --- The @{AI.AI_Balancer#AIBALANCER} class monitors and manages as many AI GROUPS as there are +-- The @{AI.AI_Balancer#AI_BALANCER} class monitors and manages as many AI GROUPS as there are -- CLIENTS in a SET_CLIENT collection not occupied by players. --- The AIBALANCER class manages internally a collection of AI management objects, which govern the behaviour +-- The AI_BALANCER class manages internally a collection of AI management objects, which govern the behaviour -- of the underlying AI GROUPS. -- -- The parent class @{Core.Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM) -- and calls for each event the state transition methods providing the internal @{Core.Fsm#FSM_SET.Set} object containing the -- SET_GROUP and additional event parameters provided during the event. -- --- 1.1) AIBALANCER construction method +-- 1.1) AI_BALANCER construction method -- --------------------------------------- --- Create a new AIBALANCER object with the @{#AIBALANCER.New} method: +-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New} method: -- --- * @{#AIBALANCER.New}: Creates a new AIBALANCER object. +-- * @{#AI_BALANCER.New}: Creates a new AI_BALANCER object. -- -- 1.2) -- ---- -- * Add -- * Remove -- --- 1.2) AIBALANCER returns AI to Airbases +-- 1.2) AI_BALANCER returns AI to Airbases -- ------------------------------------------ -- You can configure to have the AI to return to: -- --- * @{#AIBALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- * @{#AIBALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. -- -- -- === -- @@ -23781,12 +23781,12 @@ end -- ### Contributions: -- -- * **Dutch_Baron (James)**: Who you can search on the Eagle Dynamics Forums. --- Working together with James has resulted in the creation of the AIBALANCER class. +-- Working together with James has resulted in the creation of the AI_BALANCER class. -- James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) -- -- * **SNAFU**: -- Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. --- None of the script code has been used however within the new AIBALANCER moose class. +-- None of the script code has been used however within the new AI_BALANCER moose class. -- -- ### Authors: -- @@ -23796,24 +23796,24 @@ end ---- AIBALANCER class --- @type AIBALANCER +--- AI_BALANCER class +-- @type AI_BALANCER -- @field Core.Set#SET_CLIENT SetClient -- @extends Core.Fsm#FSM_SET -AIBALANCER = { - ClassName = "AIBALANCER", +AI_BALANCER = { + ClassName = "AI_BALANCER", PatrolZones = {}, AIGroups = {}, } ---- Creates a new AIBALANCER object --- @param #AIBALANCER self +--- Creates a new AI_BALANCER object +-- @param #AI_BALANCER self -- @param Core.Set#SET_CLIENT SetClient A SET\_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player). -- @param Functional.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed. --- @return #AIBALANCER +-- @return #AI_BALANCER -- @usage --- -- Define a new AIBALANCER Object. -function AIBALANCER:New( SetClient, SpawnAI ) +-- -- Define a new AI_BALANCER Object. +function AI_BALANCER:New( SetClient, SpawnAI ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_SET:New( SET_GROUP:New() ) ) -- Core.Fsm#FSM_SET @@ -23841,10 +23841,10 @@ function AIBALANCER:New( SetClient, SpawnAI ) end --- Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Core.Set#SET_AIRBASE}s to evaluate where to return to. -function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) +function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) self.ToNearestAirbase = true self.ReturnTresholdRange = ReturnTresholdRange @@ -23852,19 +23852,19 @@ function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseS end --- Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -function AIBALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) +function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) self.ToHomeAirbase = true self.ReturnTresholdRange = ReturnTresholdRange end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -23878,18 +23878,18 @@ function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) self:Spawned( AIGroup ) end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) AIGroup:Destroy() end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then @@ -23912,8 +23912,8 @@ function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) end ---- @param #AIBALANCER self -function AIBALANCER:onenterMonitoring( SetGroup ) +--- @param #AI_BALANCER self +function AI_BALANCER:onenterMonitoring( SetGroup ) self.SetClient:ForEachClient( --- @param Wrapper.Client#CLIENT Client @@ -23983,9 +23983,9 @@ end -- -- === -- --- 1) @{#PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} +-- 1) @{#AI_PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} -- ================================================================ --- The @{#PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. +-- The @{#AI_PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. -- The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, -- a random point is selected as the route point within the 3D space, within the given boundary limits. -- The airplane will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. @@ -23993,24 +23993,24 @@ end -- This cycle will continue until a fuel treshold has been reached by the airplane. -- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land. -- --- 1.1) PATROLZONE constructor: +-- 1.1) AI_PATROLZONE constructor: -- ---------------------------- -- --- * @{#PATROLZONE.New}(): Creates a new PATROLZONE object. +-- * @{#AI_PATROLZONE.New}(): Creates a new AI_PATROLZONE object. -- --- 1.2) PATROLZONE state machine: +-- 1.2) AI_PATROLZONE state machine: -- ---------------------------------- --- The PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. +-- The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. -- --- ### 1.2.1) PATROLZONE Events: +-- ### 1.2.1) AI_PATROLZONE Events: -- --- * @{#PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. --- * @{#PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. --- * @{#PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. --- * @{#PATROLZONE.End}( AIControllable ): The end of the PATROLZONE process. --- * @{#PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The PATROLZONE process will be ended. +-- * @{#AI_PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. +-- * @{#AI_PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. +-- * @{#AI_PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. +-- * @{#AI_PATROLZONE.End}( AIControllable ): The end of the AI_PATROLZONE process. +-- * @{#AI_PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The AI_PATROLZONE process will be ended. -- --- ### 1.2.2) PATROLZONE States: +-- ### 1.2.2) AI_PATROLZONE States: -- -- * **Route**: A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. -- * **Patrol**: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used. @@ -24018,7 +24018,7 @@ end -- * **Dead**: The AIControllable is dead ... -- * **End**: The process has come to an end. -- --- ### 1.2.3) PATROLZONE state transition methods: +-- ### 1.2.3) AI_PATROLZONE state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -24033,7 +24033,7 @@ end -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- An example how to manage a state transition for an PATROLZONE object **Patrol** for the state **RTB**: +-- An example how to manage a state transition for an AI_PATROLZONE object **Patrol** for the state **RTB**: -- -- local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" ) -- local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) @@ -24041,46 +24041,46 @@ end -- local PatrolSpawn = SPAWN:New( "Patrol Group" ) -- local PatrolGroup = PatrolSpawn:Spawn() -- --- local Patrol = PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) +-- local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) -- Patrol:SetControllable( PatrolGroup ) -- Patrol:ManageFuel( 0.2, 60 ) -- --- **OnBefore**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the PATROLZONE object. +-- **OnBefore**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #boolean If false is returned, then the OnAfter state transition method will not be called. -- function Patrol:OnBeforeRTB( AIGroup ) -- AIGroup:MessageToRed( "Returning to base", 20 ) -- end -- --- **OnAfter**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the PATROLZONE object. +-- **OnAfter**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone. -- function Patrol:OnAfterRTB( AIGroup ) -- return PatrolSpawn:Spawn() -- end -- --- 1.3) Manage the PATROLZONE parameters: +-- 1.3) Manage the AI_PATROLZONE parameters: -- ------------------------------------------ --- The following methods are available to modify the parameters of a PATROLZONE object: +-- The following methods are available to modify the parameters of a AI_PATROLZONE object: -- --- * @{#PATROLZONE.SetControllable}(): Set the AIControllable. --- * @{#PATROLZONE.GetControllable}(): Get the AIControllable. --- * @{#PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. --- * @{#PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetControllable}(): Set the AIControllable. +-- * @{#AI_PATROLZONE.GetControllable}(): Get the AIControllable. +-- * @{#AI_PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. -- --- 1.3) Manage the out of fuel in the PATROLZONE: +-- 1.3) Manage the out of fuel in the AI_PATROLZONE: -- ---------------------------------------------- -- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- Use the method @{#PATROLZONE.ManageFuel}() to have this proces in place. +-- Use the method @{#AI_PATROLZONE.ManageFuel}() to have this proces in place. -- -- ==== -- @@ -24116,20 +24116,20 @@ end -- State Transition Functions --- OnBefore State Transition Function --- @function [parent=#PATROLZONE] OnBeforeRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnBeforeRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean --- OnAfter State Transition Function --- @function [parent=#PATROLZONE] OnAfterRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnAfterRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable ---- PATROLZONE class --- @type PATROLZONE +--- AI_PATROLZONE class +-- @type AI_PATROLZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @field Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. @@ -24137,26 +24137,26 @@ end -- @field Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @field Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. -- @extends Core.Fsm#FSM_CONTROLLABLE -PATROLZONE = { - ClassName = "PATROLZONE", +AI_PATROLZONE = { + ClassName = "AI_PATROLZONE", } ---- Creates a new PATROLZONE object --- @param #PATROLZONE self +--- Creates a new AI_PATROLZONE object +-- @param #AI_PATROLZONE self -- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self +-- @return #AI_PATROLZONE self -- @usage --- -- Define a new PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. +-- -- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. -- PatrolZone = ZONE:New( 'PatrolZone' ) -- PatrolSpawn = SPAWN:New( 'Patrol Group' ) --- PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) -function PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) +-- PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) +function AI_PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_CONTROLLABLE:New() ) -- Core.Fsm#FSM_CONTROLLABLE @@ -24182,11 +24182,11 @@ end --- Sets (modifies) the minimum and maximum speed of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self -function PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) self:F2( { PatrolMinSpeed, PatrolMaxSpeed } ) self.PatrolMinSpeed = PatrolMinSpeed @@ -24196,11 +24196,11 @@ end --- Sets the floor and ceiling altitude of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. --- @return #PATROLZONE self -function PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) self:F2( { PatrolFloorAltitude, PatrolCeilingAltitude } ) self.PatrolFloorAltitude = PatrolFloorAltitude @@ -24213,7 +24213,7 @@ end function _NewPatrolRoute( AIControllable ) AIControllable:T( "NewPatrolRoute" ) - local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#PATROLZONE + local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#AI_PATROLZONE PatrolZone:__Route( 1 ) end @@ -24222,13 +24222,13 @@ end --- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel. -- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base. --- @return #PATROLZONE self -function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) self.PatrolManageFuel = true self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage @@ -24238,9 +24238,9 @@ function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrb end --- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. --- @param #PATROLZONE self --- @return #PATROLZONE self -function PATROLZONE:onenterRoute() +-- @param #AI_PATROLZONE self +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:onenterRoute() self:F2() @@ -24335,8 +24335,8 @@ function PATROLZONE:onenterRoute() end ---- @param #PATROLZONE self -function PATROLZONE:onenterPatrol() +--- @param #AI_PATROLZONE self +function AI_PATROLZONE:onenterPatrol() self:F2() if self.Controllable and self.Controllable:IsAlive() then @@ -24363,31 +24363,31 @@ end -- -- Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ): -- --- * CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. +-- * AI_CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. -- * CARGO_STATIC, represented by a @{Static}: Cargo can be represented by a Static. Destruction of the Static will mean that the cargo is lost. --- * CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. --- * CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. +-- * AI_CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. +-- * AI_CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. -- * CARGO_SLINGLOAD, represented by a @{Cargo} that is transportable: Cargo can be represented by a Cargo object that is transportable. Destruction of the Cargo will mean that the cargo is lost. -- --- * CARGO_GROUPED, represented by a Group of CARGO_UNITs. +-- * AI_CARGO_GROUPED, represented by a Group of CARGO_UNITs. -- --- 1) @{AI.AI_Cargo#CARGO_BASE} class, extends @{Core.Fsm#FSM_PROCESS} +-- 1) @{AI.AI_Cargo#AI_CARGO} class, extends @{Core.Fsm#FSM_PROCESS} -- ========================================================================== --- The @{#CARGO_BASE} class defines the core functions that defines a cargo object within MOOSE. +-- The @{#AI_CARGO} class defines the core functions that defines a cargo object within MOOSE. -- A cargo is a logical object defined that is available for transport, and has a life status within a simulation. -- --- The CARGO_BASE is a state machine: it manages the different events and states of the cargo. --- All derived classes from CARGO_BASE follow the same state machine, expose the same cargo event functions, and provide the same cargo states. +-- The AI_CARGO is a state machine: it manages the different events and states of the cargo. +-- All derived classes from AI_CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states. -- --- ## 1.2.1) CARGO_BASE Events: +-- ## 1.2.1) AI_CARGO Events: -- --- * @{#CARGO_BASE.Board}( ToCarrier ): Boards the cargo to a carrier. --- * @{#CARGO_BASE.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. --- * @{#CARGO_BASE.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. --- * @{#CARGO_BASE.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. --- * @{#CARGO_BASE.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. +-- * @{#AI_CARGO.Board}( ToCarrier ): Boards the cargo to a carrier. +-- * @{#AI_CARGO.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. +-- * @{#AI_CARGO.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. +-- * @{#AI_CARGO.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. +-- * @{#AI_CARGO.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. -- --- ## 1.2.2) CARGO_BASE States: +-- ## 1.2.2) AI_CARGO States: -- -- * **UnLoaded**: The cargo is unloaded from a carrier. -- * **Boarding**: The cargo is currently boarding (= running) into a carrier. @@ -24396,7 +24396,7 @@ end -- * **Dead**: The cargo is dead ... -- * **End**: The process has come to an end. -- --- ## 1.2.3) CARGO_BASE state transition methods: +-- ## 1.2.3) AI_CARGO state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -24411,15 +24411,15 @@ end -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- 2) #CARGO_UNIT class +-- 2) #AI_CARGO_UNIT class -- ==================== --- The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- --- 5) #CARGO_GROUPED class +-- 5) #AI_CARGO_GROUPED class -- ======================= --- The CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- -- This module is still under construction, but is described above works already, and will keep working ... -- @@ -24431,14 +24431,14 @@ end --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Board +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Board +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -24447,14 +24447,14 @@ end --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnBoard +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnBoard +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. @@ -24463,14 +24463,14 @@ end --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Load +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Load +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -24479,14 +24479,14 @@ end --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnLoad +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnLoad +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. @@ -24494,46 +24494,46 @@ end -- UnLoaded ---- @function [parent=#CARGO_BASE] OnBeforeUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Loaded ---- @function [parent=#CARGO_BASE] OnBeforeLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Boarding ---- @function [parent=#CARGO_BASE] OnBeforeBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- UnBoarding ---- @function [parent=#CARGO_BASE] OnBeforeUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable @@ -24541,9 +24541,9 @@ end CARGOS = {} -do -- CARGO_BASE +do -- AI_CARGO - --- @type CARGO_BASE + --- @type AI_CARGO -- @extends Core.Fsm#FSM_PROCESS -- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers. -- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo. @@ -24556,8 +24556,8 @@ do -- CARGO_BASE -- @field #boolean Moveable This flag defines if the cargo is moveable. -- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit. -- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit. - CARGO_BASE = { - ClassName = "CARGO_BASE", + AI_CARGO = { + ClassName = "AI_CARGO", Type = nil, Name = nil, Weight = nil, @@ -24569,19 +24569,19 @@ do -- CARGO_BASE Containable = false, } ---- @type CARGO_BASE.CargoObjects +--- @type AI_CARGO.CargoObjects -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. ---- CARGO_BASE Constructor. This class is an abstract class and should not be instantiated. --- @param #CARGO_BASE self +--- AI_CARGO Constructor. This class is an abstract class and should not be instantiated. +-- @param #AI_CARGO self -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_BASE -function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) +-- @return #AI_CARGO +function AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) local self = BASE:Inherit( self, FSM:New() ) -- Core.Fsm#FSM_CONTROLLABLE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) @@ -24618,20 +24618,20 @@ function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) end ---- Template method to spawn a new representation of the CARGO_BASE in the simulator. --- @param #CARGO_BASE self --- @return #CARGO_BASE -function CARGO_BASE:Spawn( PointVec2 ) +--- Template method to spawn a new representation of the AI_CARGO in the simulator. +-- @param #AI_CARGO self +-- @return #AI_CARGO +function AI_CARGO:Spawn( PointVec2 ) self:F() end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_BASE self +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 PointVec2 -- @return #boolean -function CARGO_BASE:IsNear( PointVec2 ) +function AI_CARGO:IsNear( PointVec2 ) self:F( { PointVec2 } ) local Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() ) @@ -24646,36 +24646,36 @@ end end -do -- CARGO_REPRESENTABLE +do -- AI_CARGO_REPRESENTABLE - --- @type CARGO_REPRESENTABLE - -- @extends #CARGO_BASE - CARGO_REPRESENTABLE = { - ClassName = "CARGO_REPRESENTABLE" + --- @type AI_CARGO_REPRESENTABLE + -- @extends #AI_CARGO + AI_CARGO_REPRESENTABLE = { + ClassName = "AI_CARGO_REPRESENTABLE" } ---- CARGO_REPRESENTABLE Constructor. --- @param #CARGO_REPRESENTABLE self +--- AI_CARGO_REPRESENTABLE Constructor. +-- @param #AI_CARGO_REPRESENTABLE self -- @param Wrapper.Controllable#Controllable CargoObject -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_BASE +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) return self end --- Route a cargo unit to a PointVec2. --- @param #CARGO_REPRESENTABLE self +-- @param #AI_CARGO_REPRESENTABLE self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #number Speed --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) self:F2( ToPointVec2 ) local Points = {} @@ -24690,27 +24690,27 @@ function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) return self end -end -- CARGO_BASE +end -- AI_CARGO -do -- CARGO_UNIT +do -- AI_CARGO_UNIT - --- @type CARGO_UNIT - -- @extends #CARGO_REPRESENTABLE - CARGO_UNIT = { - ClassName = "CARGO_UNIT" + --- @type AI_CARGO_UNIT + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_UNIT = { + ClassName = "AI_CARGO_UNIT" } ---- CARGO_UNIT Constructor. --- @param #CARGO_UNIT self +--- AI_CARGO_UNIT Constructor. +-- @param #AI_CARGO_UNIT self -- @param Wrapper.Unit#UNIT CargoUnit -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_UNIT -function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_UNIT +-- @return #AI_CARGO_UNIT +function AI_CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_UNIT self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoUnit ) @@ -24722,12 +24722,12 @@ function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius end --- Enter UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Angle = 180 @@ -24767,12 +24767,12 @@ function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -24791,12 +24791,12 @@ function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -24816,12 +24816,12 @@ end --- Enter UnLoaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -24854,12 +24854,12 @@ end --- Enter Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Speed = 10 @@ -24886,12 +24886,12 @@ function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then @@ -24904,12 +24904,12 @@ function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Loaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -24923,11 +24923,11 @@ end --- Board Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -function CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -24944,25 +24944,25 @@ end end -do -- CARGO_PACKAGE +do -- AI_CARGO_PACKAGE - --- @type CARGO_PACKAGE - -- @extends #CARGO_REPRESENTABLE - CARGO_PACKAGE = { - ClassName = "CARGO_PACKAGE" + --- @type AI_CARGO_PACKAGE + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_PACKAGE = { + ClassName = "AI_CARGO_PACKAGE" } ---- CARGO_PACKAGE Constructor. --- @param #CARGO_PACKAGE self +--- AI_CARGO_PACKAGE Constructor. +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier The UNIT carrying the package. -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_PACKAGE -function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_PACKAGE +-- @return #AI_CARGO_PACKAGE +function AI_CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_PACKAGE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoCarrier ) @@ -24972,7 +24972,7 @@ function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, Near end --- Board Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -24980,7 +24980,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25010,10 +25010,10 @@ function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, Boa end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier -- @return #boolean -function CARGO_PACKAGE:IsNear( CargoCarrier ) +function AI_CARGO_PACKAGE:IsNear( CargoCarrier ) self:F() local CargoCarrierPoint = CargoCarrier:GetPointVec2() @@ -25029,12 +25029,12 @@ function CARGO_PACKAGE:IsNear( CargoCarrier ) end --- Boarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -25045,7 +25045,7 @@ function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, B end --- UnBoard Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -25054,7 +25054,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25087,12 +25087,12 @@ function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnL end --- UnBoarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -25103,7 +25103,7 @@ function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) end --- Load Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -25111,7 +25111,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -25131,13 +25131,13 @@ function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDi end --- UnLoad Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param #number Distance -- @param #number Angle -function CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -25159,27 +25159,27 @@ end end -do -- CARGO_GROUP +do -- AI_CARGO_GROUP - --- @type CARGO_GROUP - -- @extends AI.AI_Cargo#CARGO_BASE + --- @type AI_CARGO_GROUP + -- @extends AI.AI_Cargo#AI_CARGO -- @field Set#SET_BASE CargoSet A set of cargo objects. -- @field #string Name A string defining the name of the cargo group. The name is the unique identifier of the cargo. - CARGO_GROUP = { - ClassName = "CARGO_GROUP", + AI_CARGO_GROUP = { + ClassName = "AI_CARGO_GROUP", } ---- CARGO_GROUP constructor. --- @param #CARGO_GROUP self +--- AI_CARGO_GROUP constructor. +-- @param #AI_CARGO_GROUP self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUP -function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #CARGO_GROUP +-- @return #AI_CARGO_GROUP +function AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUP self:F( { Type, Name, ReportRadius, NearRadius } ) self.CargoSet = CargoSet @@ -25188,44 +25188,44 @@ function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) return self end -end -- CARGO_GROUP +end -- AI_CARGO_GROUP -do -- CARGO_GROUPED +do -- AI_CARGO_GROUPED - --- @type CARGO_GROUPED - -- @extends AI.AI_Cargo#CARGO_GROUP - CARGO_GROUPED = { - ClassName = "CARGO_GROUPED", + --- @type AI_CARGO_GROUPED + -- @extends AI.AI_Cargo#AI_CARGO_GROUP + AI_CARGO_GROUPED = { + ClassName = "AI_CARGO_GROUPED", } ---- CARGO_GROUPED constructor. --- @param #CARGO_GROUPED self +--- AI_CARGO_GROUPED constructor. +-- @param #AI_CARGO_GROUPED self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUPED -function CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #CARGO_GROUPED +-- @return #AI_CARGO_GROUPED +function AI_CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUPED self:F( { Type, Name, ReportRadius, NearRadius } ) return self end --- Enter Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__Board( 1, CargoCarrier ) @@ -25238,16 +25238,16 @@ function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) end --- Enter Loaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, load each cargo to the CargoCarrier. + -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do Cargo:Load( CargoCarrier ) end @@ -25255,17 +25255,17 @@ function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Boarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "Loaded" ) then @@ -25282,19 +25282,19 @@ function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Enter UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Timer = 1 if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__UnBoard( Timer, ToPointVec2 ) @@ -25308,12 +25308,12 @@ function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -25323,7 +25323,7 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) if From == "UnBoarding" then local UnBoarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "UnLoaded" ) then @@ -25343,12 +25343,12 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self:__UnLoad( 1, ToPointVec2 ) @@ -25357,17 +25357,17 @@ end --- Enter UnLoaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:UnLoad( ToPointVec2 ) @@ -25378,7 +25378,7 @@ function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) end -end -- CARGO_GROUPED +end -- AI_CARGO_GROUPED diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index b1d605373..ac46b458e 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20161216_1630' ) +env.info( 'Moose Generation Timestamp: 20161216_1640' ) local base = _G Include = {} @@ -23723,38 +23723,38 @@ function DETECTION_AREAS:CreateDetectionSets() end ---- This module contains the AIBALANCER class. +--- This module contains the AI_BALANCER class. -- -- === -- --- 1) @{AI.AI_Balancer#AIBALANCER} class, extends @{Core.Fsm#FSM_SET} +-- 1) @{AI.AI_Balancer#AI_BALANCER} class, extends @{Core.Fsm#FSM_SET} -- =================================================================================== --- The @{AI.AI_Balancer#AIBALANCER} class monitors and manages as many AI GROUPS as there are +-- The @{AI.AI_Balancer#AI_BALANCER} class monitors and manages as many AI GROUPS as there are -- CLIENTS in a SET_CLIENT collection not occupied by players. --- The AIBALANCER class manages internally a collection of AI management objects, which govern the behaviour +-- The AI_BALANCER class manages internally a collection of AI management objects, which govern the behaviour -- of the underlying AI GROUPS. -- -- The parent class @{Core.Fsm#FSM_SET} manages the functionality to control the Finite State Machine (FSM) -- and calls for each event the state transition methods providing the internal @{Core.Fsm#FSM_SET.Set} object containing the -- SET_GROUP and additional event parameters provided during the event. -- --- 1.1) AIBALANCER construction method +-- 1.1) AI_BALANCER construction method -- --------------------------------------- --- Create a new AIBALANCER object with the @{#AIBALANCER.New} method: +-- Create a new AI_BALANCER object with the @{#AI_BALANCER.New} method: -- --- * @{#AIBALANCER.New}: Creates a new AIBALANCER object. +-- * @{#AI_BALANCER.New}: Creates a new AI_BALANCER object. -- -- 1.2) -- ---- -- * Add -- * Remove -- --- 1.2) AIBALANCER returns AI to Airbases +-- 1.2) AI_BALANCER returns AI to Airbases -- ------------------------------------------ -- You can configure to have the AI to return to: -- --- * @{#AIBALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- * @{#AIBALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToHomeAirbase}: Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. +-- * @{#AI_BALANCER.ReturnToNearestAirbases}: Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. -- -- -- === -- @@ -23781,12 +23781,12 @@ end -- ### Contributions: -- -- * **Dutch_Baron (James)**: Who you can search on the Eagle Dynamics Forums. --- Working together with James has resulted in the creation of the AIBALANCER class. +-- Working together with James has resulted in the creation of the AI_BALANCER class. -- James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-) -- -- * **SNAFU**: -- Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. --- None of the script code has been used however within the new AIBALANCER moose class. +-- None of the script code has been used however within the new AI_BALANCER moose class. -- -- ### Authors: -- @@ -23796,24 +23796,24 @@ end ---- AIBALANCER class --- @type AIBALANCER +--- AI_BALANCER class +-- @type AI_BALANCER -- @field Core.Set#SET_CLIENT SetClient -- @extends Core.Fsm#FSM_SET -AIBALANCER = { - ClassName = "AIBALANCER", +AI_BALANCER = { + ClassName = "AI_BALANCER", PatrolZones = {}, AIGroups = {}, } ---- Creates a new AIBALANCER object --- @param #AIBALANCER self +--- Creates a new AI_BALANCER object +-- @param #AI_BALANCER self -- @param Core.Set#SET_CLIENT SetClient A SET\_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player). -- @param Functional.Spawn#SPAWN SpawnAI The default Spawn object to spawn new AI Groups when needed. --- @return #AIBALANCER +-- @return #AI_BALANCER -- @usage --- -- Define a new AIBALANCER Object. -function AIBALANCER:New( SetClient, SpawnAI ) +-- -- Define a new AI_BALANCER Object. +function AI_BALANCER:New( SetClient, SpawnAI ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_SET:New( SET_GROUP:New() ) ) -- Core.Fsm#FSM_SET @@ -23841,10 +23841,10 @@ function AIBALANCER:New( SetClient, SpawnAI ) end --- Returns the AI to the nearest friendly @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -- @param Core.Set#SET_AIRBASE ReturnAirbaseSet The SET of @{Core.Set#SET_AIRBASE}s to evaluate where to return to. -function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) +function AI_BALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseSet ) self.ToNearestAirbase = true self.ReturnTresholdRange = ReturnTresholdRange @@ -23852,19 +23852,19 @@ function AIBALANCER:ReturnToNearestAirbases( ReturnTresholdRange, ReturnAirbaseS end --- Returns the AI to the home @{Wrapper.Airbase#AIRBASE}. --- @param #AIBALANCER self +-- @param #AI_BALANCER self -- @param Dcs.DCSTypes#Distance ReturnTresholdRange If there is an enemy @{Wrapper.Client#CLIENT} within the ReturnTresholdRange given in meters, the AI will not return to the nearest @{Wrapper.Airbase#AIRBASE}. -function AIBALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) +function AI_BALANCER:ReturnToHomeAirbase( ReturnTresholdRange ) self.ToHomeAirbase = true self.ReturnTresholdRange = ReturnTresholdRange end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param #string ClientName -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) +function AI_BALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) -- OK, Spawn a new group from the default SpawnAI object provided. local AIGroup = self.SpawnAI:Spawn() @@ -23878,18 +23878,18 @@ function AIBALANCER:onenterSpawning( SetGroup, Event, From, To, ClientName ) self:Spawned( AIGroup ) end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterDestroying( SetGroup, Event, From, To, AIGroup ) AIGroup:Destroy() end ---- @param #AIBALANCER self +--- @param #AI_BALANCER self -- @param Core.Set#SET_GROUP SetGroup -- @param Wrapper.Group#GROUP AIGroup -function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) +function AI_BALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) local AIGroupTemplate = AIGroup:GetTemplate() if self.ToHomeAirbase == true then @@ -23912,8 +23912,8 @@ function AIBALANCER:onenterReturning( SetGroup, Event, From, To, AIGroup ) end ---- @param #AIBALANCER self -function AIBALANCER:onenterMonitoring( SetGroup ) +--- @param #AI_BALANCER self +function AI_BALANCER:onenterMonitoring( SetGroup ) self.SetClient:ForEachClient( --- @param Wrapper.Client#CLIENT Client @@ -23983,9 +23983,9 @@ end -- -- === -- --- 1) @{#PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} +-- 1) @{#AI_PATROLZONE} class, extends @{Core.Fsm#FSM_CONTROLLABLE} -- ================================================================ --- The @{#PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. +-- The @{#AI_PATROLZONE} class implements the core functions to patrol a @{Zone} by an AIR @{Controllable} @{Group}. -- The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, -- a random point is selected as the route point within the 3D space, within the given boundary limits. -- The airplane will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. @@ -23993,24 +23993,24 @@ end -- This cycle will continue until a fuel treshold has been reached by the airplane. -- When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land. -- --- 1.1) PATROLZONE constructor: +-- 1.1) AI_PATROLZONE constructor: -- ---------------------------- -- --- * @{#PATROLZONE.New}(): Creates a new PATROLZONE object. +-- * @{#AI_PATROLZONE.New}(): Creates a new AI_PATROLZONE object. -- --- 1.2) PATROLZONE state machine: +-- 1.2) AI_PATROLZONE state machine: -- ---------------------------------- --- The PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. +-- The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling. -- --- ### 1.2.1) PATROLZONE Events: +-- ### 1.2.1) AI_PATROLZONE Events: -- --- * @{#PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. --- * @{#PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. --- * @{#PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. --- * @{#PATROLZONE.End}( AIControllable ): The end of the PATROLZONE process. --- * @{#PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The PATROLZONE process will be ended. +-- * @{#AI_PATROLZONE.Route}( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. +-- * @{#AI_PATROLZONE.Patrol}( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds. +-- * @{#AI_PATROLZONE.RTB}( AIControllable ): The AIControllable will report return to base. +-- * @{#AI_PATROLZONE.End}( AIControllable ): The end of the AI_PATROLZONE process. +-- * @{#AI_PATROLZONE.Dead}( AIControllable ): The AIControllable is dead. The AI_PATROLZONE process will be ended. -- --- ### 1.2.2) PATROLZONE States: +-- ### 1.2.2) AI_PATROLZONE States: -- -- * **Route**: A new 3D route point is selected and the AIControllable will fly towards that point with the given speed. -- * **Patrol**: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used. @@ -24018,7 +24018,7 @@ end -- * **Dead**: The AIControllable is dead ... -- * **End**: The process has come to an end. -- --- ### 1.2.3) PATROLZONE state transition methods: +-- ### 1.2.3) AI_PATROLZONE state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -24033,7 +24033,7 @@ end -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- An example how to manage a state transition for an PATROLZONE object **Patrol** for the state **RTB**: +-- An example how to manage a state transition for an AI_PATROLZONE object **Patrol** for the state **RTB**: -- -- local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" ) -- local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) @@ -24041,46 +24041,46 @@ end -- local PatrolSpawn = SPAWN:New( "Patrol Group" ) -- local PatrolGroup = PatrolSpawn:Spawn() -- --- local Patrol = PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) +-- local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 ) -- Patrol:SetControllable( PatrolGroup ) -- Patrol:ManageFuel( 0.2, 60 ) -- --- **OnBefore**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the PATROLZONE object. +-- **OnBefore**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **before** the RTB default action is processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #boolean If false is returned, then the OnAfter state transition method will not be called. -- function Patrol:OnBeforeRTB( AIGroup ) -- AIGroup:MessageToRed( "Returning to base", 20 ) -- end -- --- **OnAfter**RTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the PATROLZONE object. +-- **OnAfter**RTB( AIGroup ) will be called by the AI_PATROLZONE object when the AIGroup reports RTB, but **after** the RTB default action was processed by the AI_PATROLZONE object. -- --- --- State transition function for the PATROLZONE **Patrol** object --- -- @param #PATROLZONE self +-- --- State transition function for the AI_PATROLZONE **Patrol** object +-- -- @param #AI_PATROLZONE self -- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup -- -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone. -- function Patrol:OnAfterRTB( AIGroup ) -- return PatrolSpawn:Spawn() -- end -- --- 1.3) Manage the PATROLZONE parameters: +-- 1.3) Manage the AI_PATROLZONE parameters: -- ------------------------------------------ --- The following methods are available to modify the parameters of a PATROLZONE object: +-- The following methods are available to modify the parameters of a AI_PATROLZONE object: -- --- * @{#PATROLZONE.SetControllable}(): Set the AIControllable. --- * @{#PATROLZONE.GetControllable}(): Get the AIControllable. --- * @{#PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. --- * @{#PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetControllable}(): Set the AIControllable. +-- * @{#AI_PATROLZONE.GetControllable}(): Get the AIControllable. +-- * @{#AI_PATROLZONE.SetSpeed}(): Set the patrol speed of the AI, for the next patrol. +-- * @{#AI_PATROLZONE.SetAltitude}(): Set altitude of the AI, for the next patrol. -- --- 1.3) Manage the out of fuel in the PATROLZONE: +-- 1.3) Manage the out of fuel in the AI_PATROLZONE: -- ---------------------------------------------- -- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- Use the method @{#PATROLZONE.ManageFuel}() to have this proces in place. +-- Use the method @{#AI_PATROLZONE.ManageFuel}() to have this proces in place. -- -- ==== -- @@ -24116,20 +24116,20 @@ end -- State Transition Functions --- OnBefore State Transition Function --- @function [parent=#PATROLZONE] OnBeforeRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnBeforeRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean --- OnAfter State Transition Function --- @function [parent=#PATROLZONE] OnAfterRoute --- @param #PATROLZONE self +-- @function [parent=#AI_PATROLZONE] OnAfterRoute +-- @param #AI_PATROLZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable ---- PATROLZONE class --- @type PATROLZONE +--- AI_PATROLZONE class +-- @type AI_PATROLZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @field Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. @@ -24137,26 +24137,26 @@ end -- @field Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @field Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. -- @extends Core.Fsm#FSM_CONTROLLABLE -PATROLZONE = { - ClassName = "PATROLZONE", +AI_PATROLZONE = { + ClassName = "AI_PATROLZONE", } ---- Creates a new PATROLZONE object --- @param #PATROLZONE self +--- Creates a new AI_PATROLZONE object +-- @param #AI_PATROLZONE self -- @param Core.Zone#ZONE_BASE PatrolZone The @{Zone} where the patrol needs to be executed. -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self +-- @return #AI_PATROLZONE self -- @usage --- -- Define a new PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. +-- -- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h. -- PatrolZone = ZONE:New( 'PatrolZone' ) -- PatrolSpawn = SPAWN:New( 'Patrol Group' ) --- PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) -function PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) +-- PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) +function AI_PATROLZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed ) -- Inherits from BASE local self = BASE:Inherit( self, FSM_CONTROLLABLE:New() ) -- Core.Fsm#FSM_CONTROLLABLE @@ -24182,11 +24182,11 @@ end --- Sets (modifies) the minimum and maximum speed of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Speed PatrolMinSpeed The minimum speed of the @{Controllable} in km/h. -- @param Dcs.DCSTypes#Speed PatrolMaxSpeed The maximum speed of the @{Controllable} in km/h. --- @return #PATROLZONE self -function PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) self:F2( { PatrolMinSpeed, PatrolMaxSpeed } ) self.PatrolMinSpeed = PatrolMinSpeed @@ -24196,11 +24196,11 @@ end --- Sets the floor and ceiling altitude of the patrol. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Dcs.DCSTypes#Altitude PatrolFloorAltitude The lowest altitude in meters where to execute the patrol. -- @param Dcs.DCSTypes#Altitude PatrolCeilingAltitude The highest altitude in meters where to execute the patrol. --- @return #PATROLZONE self -function PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) self:F2( { PatrolFloorAltitude, PatrolCeilingAltitude } ) self.PatrolFloorAltitude = PatrolFloorAltitude @@ -24213,7 +24213,7 @@ end function _NewPatrolRoute( AIControllable ) AIControllable:T( "NewPatrolRoute" ) - local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#PATROLZONE + local PatrolZone = AIControllable:GetState( AIControllable, "PatrolZone" ) -- PatrolCore.Zone#AI_PATROLZONE PatrolZone:__Route( 1 ) end @@ -24222,13 +24222,13 @@ end --- When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. --- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +-- When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -- Once the time is finished, the old AIControllable will return to the base. --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel. -- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base. --- @return #PATROLZONE self -function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime ) self.PatrolManageFuel = true self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage @@ -24238,9 +24238,9 @@ function PATROLZONE:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrb end --- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. --- @param #PATROLZONE self --- @return #PATROLZONE self -function PATROLZONE:onenterRoute() +-- @param #AI_PATROLZONE self +-- @return #AI_PATROLZONE self +function AI_PATROLZONE:onenterRoute() self:F2() @@ -24335,8 +24335,8 @@ function PATROLZONE:onenterRoute() end ---- @param #PATROLZONE self -function PATROLZONE:onenterPatrol() +--- @param #AI_PATROLZONE self +function AI_PATROLZONE:onenterPatrol() self:F2() if self.Controllable and self.Controllable:IsAlive() then @@ -24363,31 +24363,31 @@ end -- -- Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ): -- --- * CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. +-- * AI_CARGO_UNIT, represented by a @{Unit} in a @{Group}: Cargo can be represented by a Unit in a Group. Destruction of the Unit will mean that the cargo is lost. -- * CARGO_STATIC, represented by a @{Static}: Cargo can be represented by a Static. Destruction of the Static will mean that the cargo is lost. --- * CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. --- * CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. +-- * AI_CARGO_PACKAGE, contained in a @{Unit} of a @{Group}: Cargo can be contained within a Unit of a Group. The cargo can be **delivered** by the @{Unit}. If the Unit is destroyed, the cargo will be destroyed also. +-- * AI_CARGO_PACKAGE, Contained in a @{Static}: Cargo can be contained within a Static. The cargo can be **collected** from the @Static. If the @{Static} is destroyed, the cargo will be destroyed. -- * CARGO_SLINGLOAD, represented by a @{Cargo} that is transportable: Cargo can be represented by a Cargo object that is transportable. Destruction of the Cargo will mean that the cargo is lost. -- --- * CARGO_GROUPED, represented by a Group of CARGO_UNITs. +-- * AI_CARGO_GROUPED, represented by a Group of CARGO_UNITs. -- --- 1) @{AI.AI_Cargo#CARGO_BASE} class, extends @{Core.Fsm#FSM_PROCESS} +-- 1) @{AI.AI_Cargo#AI_CARGO} class, extends @{Core.Fsm#FSM_PROCESS} -- ========================================================================== --- The @{#CARGO_BASE} class defines the core functions that defines a cargo object within MOOSE. +-- The @{#AI_CARGO} class defines the core functions that defines a cargo object within MOOSE. -- A cargo is a logical object defined that is available for transport, and has a life status within a simulation. -- --- The CARGO_BASE is a state machine: it manages the different events and states of the cargo. --- All derived classes from CARGO_BASE follow the same state machine, expose the same cargo event functions, and provide the same cargo states. +-- The AI_CARGO is a state machine: it manages the different events and states of the cargo. +-- All derived classes from AI_CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states. -- --- ## 1.2.1) CARGO_BASE Events: +-- ## 1.2.1) AI_CARGO Events: -- --- * @{#CARGO_BASE.Board}( ToCarrier ): Boards the cargo to a carrier. --- * @{#CARGO_BASE.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. --- * @{#CARGO_BASE.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. --- * @{#CARGO_BASE.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. --- * @{#CARGO_BASE.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. +-- * @{#AI_CARGO.Board}( ToCarrier ): Boards the cargo to a carrier. +-- * @{#AI_CARGO.Load}( ToCarrier ): Loads the cargo into a carrier, regardless of its position. +-- * @{#AI_CARGO.UnBoard}( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2. +-- * @{#AI_CARGO.UnLoad}( ToPointVec2 ): UnLoads the cargo from a carrier. +-- * @{#AI_CARGO.Dead}( Controllable ): The cargo is dead. The cargo process will be ended. -- --- ## 1.2.2) CARGO_BASE States: +-- ## 1.2.2) AI_CARGO States: -- -- * **UnLoaded**: The cargo is unloaded from a carrier. -- * **Boarding**: The cargo is currently boarding (= running) into a carrier. @@ -24396,7 +24396,7 @@ end -- * **Dead**: The cargo is dead ... -- * **End**: The process has come to an end. -- --- ## 1.2.3) CARGO_BASE state transition methods: +-- ## 1.2.3) AI_CARGO state transition methods: -- -- State transition functions can be set **by the mission designer** customizing or improving the behaviour of the state. -- There are 2 moments when state transition methods will be called by the state machine: @@ -24411,15 +24411,15 @@ end -- The state transition method needs to start with the name **OnAfter + the name of the state**. -- These state transition methods need to provide a return value, which is specified at the function description. -- --- 2) #CARGO_UNIT class +-- 2) #AI_CARGO_UNIT class -- ==================== --- The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- --- 5) #CARGO_GROUPED class +-- 5) #AI_CARGO_GROUPED class -- ======================= --- The CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. --- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers. +-- The AI_CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier. +-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers. -- -- This module is still under construction, but is described above works already, and will keep working ... -- @@ -24431,14 +24431,14 @@ end --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Board +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Boards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo to the Carrier. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Board --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Board +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -24447,14 +24447,14 @@ end --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnBoard +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. --- UnBoards the cargo to a Carrier. The event will create a movement (= running or driving) of the cargo from the Carrier. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnBoard --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnBoard +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location. @@ -24463,14 +24463,14 @@ end --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] Load +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. --- Loads the cargo to a Carrier. The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -- The cargo must be in the **UnLoaded** state. --- @function [parent=#CARGO_BASE] __Load --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __Load +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Wrapper.Controllable#CONTROLLABLE ToCarrier The Carrier that will hold the cargo. @@ -24479,14 +24479,14 @@ end --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] UnLoad +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. --- UnLoads the cargo to a Carrier. The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -- The cargo must be in the **Loaded** state. --- @function [parent=#CARGO_BASE] __UnLoad --- @param #CARGO_BASE self +-- @function [parent=#AI_CARGO] __UnLoad +-- @param #AI_CARGO self -- @param #number DelaySeconds The amount of seconds to delay the action. -- @param Core.Point#POINT_VEC2 ToPointVec2 (optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location. @@ -24494,46 +24494,46 @@ end -- UnLoaded ---- @function [parent=#CARGO_BASE] OnBeforeUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Loaded ---- @function [parent=#CARGO_BASE] OnBeforeLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterLoaded --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterLoaded +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- Boarding ---- @function [parent=#CARGO_BASE] OnBeforeBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- UnBoarding ---- @function [parent=#CARGO_BASE] OnBeforeUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnBeforeUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable -- @return #boolean ---- @function [parent=#CARGO_BASE] OnAfterUnBoarding --- @param #CARGO_BASE self +--- @function [parent=#AI_CARGO] OnAfterUnBoarding +-- @param #AI_CARGO self -- @param Wrapper.Controllable#CONTROLLABLE Controllable @@ -24541,9 +24541,9 @@ end CARGOS = {} -do -- CARGO_BASE +do -- AI_CARGO - --- @type CARGO_BASE + --- @type AI_CARGO -- @extends Core.Fsm#FSM_PROCESS -- @field #string Type A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers. -- @field #string Name A string defining the name of the cargo. The name is the unique identifier of the cargo. @@ -24556,8 +24556,8 @@ do -- CARGO_BASE -- @field #boolean Moveable This flag defines if the cargo is moveable. -- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit. -- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit. - CARGO_BASE = { - ClassName = "CARGO_BASE", + AI_CARGO = { + ClassName = "AI_CARGO", Type = nil, Name = nil, Weight = nil, @@ -24569,19 +24569,19 @@ do -- CARGO_BASE Containable = false, } ---- @type CARGO_BASE.CargoObjects +--- @type AI_CARGO.CargoObjects -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. ---- CARGO_BASE Constructor. This class is an abstract class and should not be instantiated. --- @param #CARGO_BASE self +--- AI_CARGO Constructor. This class is an abstract class and should not be instantiated. +-- @param #AI_CARGO self -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_BASE -function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) +-- @return #AI_CARGO +function AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) local self = BASE:Inherit( self, FSM:New() ) -- Core.Fsm#FSM_CONTROLLABLE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) @@ -24618,20 +24618,20 @@ function CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) end ---- Template method to spawn a new representation of the CARGO_BASE in the simulator. --- @param #CARGO_BASE self --- @return #CARGO_BASE -function CARGO_BASE:Spawn( PointVec2 ) +--- Template method to spawn a new representation of the AI_CARGO in the simulator. +-- @param #AI_CARGO self +-- @return #AI_CARGO +function AI_CARGO:Spawn( PointVec2 ) self:F() end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_BASE self +-- @param #AI_CARGO self -- @param Core.Point#POINT_VEC2 PointVec2 -- @return #boolean -function CARGO_BASE:IsNear( PointVec2 ) +function AI_CARGO:IsNear( PointVec2 ) self:F( { PointVec2 } ) local Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() ) @@ -24646,36 +24646,36 @@ end end -do -- CARGO_REPRESENTABLE +do -- AI_CARGO_REPRESENTABLE - --- @type CARGO_REPRESENTABLE - -- @extends #CARGO_BASE - CARGO_REPRESENTABLE = { - ClassName = "CARGO_REPRESENTABLE" + --- @type AI_CARGO_REPRESENTABLE + -- @extends #AI_CARGO + AI_CARGO_REPRESENTABLE = { + ClassName = "AI_CARGO_REPRESENTABLE" } ---- CARGO_REPRESENTABLE Constructor. --- @param #CARGO_REPRESENTABLE self +--- AI_CARGO_REPRESENTABLE Constructor. +-- @param #AI_CARGO_REPRESENTABLE self -- @param Wrapper.Controllable#Controllable CargoObject -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_BASE +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:New( CargoObject, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) return self end --- Route a cargo unit to a PointVec2. --- @param #CARGO_REPRESENTABLE self +-- @param #AI_CARGO_REPRESENTABLE self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #number Speed --- @return #CARGO_REPRESENTABLE -function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) +-- @return #AI_CARGO_REPRESENTABLE +function AI_CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) self:F2( ToPointVec2 ) local Points = {} @@ -24690,27 +24690,27 @@ function CARGO_REPRESENTABLE:RouteTo( ToPointVec2, Speed ) return self end -end -- CARGO_BASE +end -- AI_CARGO -do -- CARGO_UNIT +do -- AI_CARGO_UNIT - --- @type CARGO_UNIT - -- @extends #CARGO_REPRESENTABLE - CARGO_UNIT = { - ClassName = "CARGO_UNIT" + --- @type AI_CARGO_UNIT + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_UNIT = { + ClassName = "AI_CARGO_UNIT" } ---- CARGO_UNIT Constructor. --- @param #CARGO_UNIT self +--- AI_CARGO_UNIT Constructor. +-- @param #AI_CARGO_UNIT self -- @param Wrapper.Unit#UNIT CargoUnit -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_UNIT -function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_UNIT +-- @return #AI_CARGO_UNIT +function AI_CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_UNIT self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoUnit ) @@ -24722,12 +24722,12 @@ function CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRadius end --- Enter UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Angle = 180 @@ -24767,12 +24767,12 @@ function CARGO_UNIT:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -24791,12 +24791,12 @@ function CARGO_UNIT:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 ToPointVec2 -function CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self.CargoInAir = self.CargoObject:InAir() @@ -24816,12 +24816,12 @@ end --- Enter UnLoaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Core.Point#POINT_VEC2 -function CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_UNIT:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -24854,12 +24854,12 @@ end --- Enter Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Speed = 10 @@ -24886,12 +24886,12 @@ function CARGO_UNIT:onenterBoarding( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if self:IsNear( CargoCarrier:GetPointVec2() ) then @@ -24904,12 +24904,12 @@ function CARGO_UNIT:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Loaded State. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onenterLoaded( Event, From, To, CargoCarrier ) self:F() self.CargoCarrier = CargoCarrier @@ -24923,11 +24923,11 @@ end --- Board Event. --- @param #CARGO_UNIT self +-- @param #AI_CARGO_UNIT self -- @param #string Event -- @param #string From -- @param #string To -function CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) +function AI_CARGO_UNIT:onafterBoard( Event, From, To, CargoCarrier ) self:F() self.CargoInAir = self.CargoObject:InAir() @@ -24944,25 +24944,25 @@ end end -do -- CARGO_PACKAGE +do -- AI_CARGO_PACKAGE - --- @type CARGO_PACKAGE - -- @extends #CARGO_REPRESENTABLE - CARGO_PACKAGE = { - ClassName = "CARGO_PACKAGE" + --- @type AI_CARGO_PACKAGE + -- @extends #AI_CARGO_REPRESENTABLE + AI_CARGO_PACKAGE = { + ClassName = "AI_CARGO_PACKAGE" } ---- CARGO_PACKAGE Constructor. --- @param #CARGO_PACKAGE self +--- AI_CARGO_PACKAGE Constructor. +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier The UNIT carrying the package. -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_PACKAGE -function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO_PACKAGE +-- @return #AI_CARGO_PACKAGE +function AI_CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_REPRESENTABLE:New( CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #AI_CARGO_PACKAGE self:F( { Type, Name, Weight, ReportRadius, NearRadius } ) self:T( CargoCarrier ) @@ -24972,7 +24972,7 @@ function CARGO_PACKAGE:New( CargoCarrier, Type, Name, Weight, ReportRadius, Near end --- Board Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -24980,7 +24980,7 @@ end -- @param #number Speed -- @param #number BoardDistance -- @param #number Angle -function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25010,10 +25010,10 @@ function CARGO_PACKAGE:onafterOnBoard( Event, From, To, CargoCarrier, Speed, Boa end --- Check if CargoCarrier is near the Cargo to be Loaded. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param Wrapper.Unit#UNIT CargoCarrier -- @return #boolean -function CARGO_PACKAGE:IsNear( CargoCarrier ) +function AI_CARGO_PACKAGE:IsNear( CargoCarrier ) self:F() local CargoCarrierPoint = CargoCarrier:GetPointVec2() @@ -25029,12 +25029,12 @@ function CARGO_PACKAGE:IsNear( CargoCarrier ) end --- Boarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle ) self:F() if self:IsNear( CargoCarrier ) then @@ -25045,7 +25045,7 @@ function CARGO_PACKAGE:onafterOnBoarded( Event, From, To, CargoCarrier, Speed, B end --- UnBoard Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -25054,7 +25054,7 @@ end -- @param #number UnBoardDistance -- @param #number Radius -- @param #number Angle -function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) +function AI_CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle ) self:F() self.CargoInAir = self.CargoCarrier:InAir() @@ -25087,12 +25087,12 @@ function CARGO_PACKAGE:onafterUnBoard( Event, From, To, CargoCarrier, Speed, UnL end --- UnBoarded Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param Wrapper.Unit#UNIT CargoCarrier -function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) +function AI_CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) self:F() if self:IsNear( CargoCarrier ) then @@ -25103,7 +25103,7 @@ function CARGO_PACKAGE:onafterUnBoarded( Event, From, To, CargoCarrier, Speed ) end --- Load Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To @@ -25111,7 +25111,7 @@ end -- @param #number Speed -- @param #number LoadDistance -- @param #number Angle -function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) +function AI_CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDistance, Angle ) self:F() self.CargoCarrier = CargoCarrier @@ -25131,13 +25131,13 @@ function CARGO_PACKAGE:onafterLoad( Event, From, To, CargoCarrier, Speed, LoadDi end --- UnLoad Event. --- @param #CARGO_PACKAGE self +-- @param #AI_CARGO_PACKAGE self -- @param #string Event -- @param #string From -- @param #string To -- @param #number Distance -- @param #number Angle -function CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) +function AI_CARGO_PACKAGE:onafterUnLoad( Event, From, To, CargoCarrier, Speed, Distance, Angle ) self:F() local StartPointVec2 = self.CargoCarrier:GetPointVec2() @@ -25159,27 +25159,27 @@ end end -do -- CARGO_GROUP +do -- AI_CARGO_GROUP - --- @type CARGO_GROUP - -- @extends AI.AI_Cargo#CARGO_BASE + --- @type AI_CARGO_GROUP + -- @extends AI.AI_Cargo#AI_CARGO -- @field Set#SET_BASE CargoSet A set of cargo objects. -- @field #string Name A string defining the name of the cargo group. The name is the unique identifier of the cargo. - CARGO_GROUP = { - ClassName = "CARGO_GROUP", + AI_CARGO_GROUP = { + ClassName = "AI_CARGO_GROUP", } ---- CARGO_GROUP constructor. --- @param #CARGO_GROUP self +--- AI_CARGO_GROUP constructor. +-- @param #AI_CARGO_GROUP self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUP -function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_BASE:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #CARGO_GROUP +-- @return #AI_CARGO_GROUP +function AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO:New( Type, Name, 0, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUP self:F( { Type, Name, ReportRadius, NearRadius } ) self.CargoSet = CargoSet @@ -25188,44 +25188,44 @@ function CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) return self end -end -- CARGO_GROUP +end -- AI_CARGO_GROUP -do -- CARGO_GROUPED +do -- AI_CARGO_GROUPED - --- @type CARGO_GROUPED - -- @extends AI.AI_Cargo#CARGO_GROUP - CARGO_GROUPED = { - ClassName = "CARGO_GROUPED", + --- @type AI_CARGO_GROUPED + -- @extends AI.AI_Cargo#AI_CARGO_GROUP + AI_CARGO_GROUPED = { + ClassName = "AI_CARGO_GROUPED", } ---- CARGO_GROUPED constructor. --- @param #CARGO_GROUPED self +--- AI_CARGO_GROUPED constructor. +-- @param #AI_CARGO_GROUPED self -- @param Core.Set#Set_BASE CargoSet -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number ReportRadius (optional) -- @param #number NearRadius (optional) --- @return #CARGO_GROUPED -function CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) - local self = BASE:Inherit( self, CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #CARGO_GROUPED +-- @return #AI_CARGO_GROUPED +function AI_CARGO_GROUPED:New( CargoSet, Type, Name, ReportRadius, NearRadius ) + local self = BASE:Inherit( self, AI_CARGO_GROUP:New( CargoSet, Type, Name, ReportRadius, NearRadius ) ) -- #AI_CARGO_GROUPED self:F( { Type, Name, ReportRadius, NearRadius } ) return self end --- Enter Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__Board( 1, CargoCarrier ) @@ -25238,16 +25238,16 @@ function CARGO_GROUPED:onenterBoarding( Event, From, To, CargoCarrier ) end --- Enter Loaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) if From == "UnLoaded" then - -- For each Cargo object within the CARGO_GROUPED, load each cargo to the CargoCarrier. + -- For each Cargo object within the AI_CARGO_GROUPED, load each cargo to the CargoCarrier. for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do Cargo:Load( CargoCarrier ) end @@ -25255,17 +25255,17 @@ function CARGO_GROUPED:onenterLoaded( Event, From, To, CargoCarrier ) end --- Leave Boarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Wrapper.Unit#UNIT CargoCarrier -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) +function AI_CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) self:F( { CargoCarrier.UnitName, Event, From, To } ) local Boarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "Loaded" ) then @@ -25282,19 +25282,19 @@ function CARGO_GROUPED:onleaveBoarding( Event, From, To, CargoCarrier ) end --- Enter UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) self:F() local Timer = 1 if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:__UnBoard( Timer, ToPointVec2 ) @@ -25308,12 +25308,12 @@ function CARGO_GROUPED:onenterUnBoarding( Event, From, To, ToPointVec2 ) end --- Leave UnBoarding State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) local Angle = 180 @@ -25323,7 +25323,7 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) if From == "UnBoarding" then local UnBoarded = true - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do self:T( Cargo.current ) if not Cargo:is( "UnLoaded" ) then @@ -25343,12 +25343,12 @@ function CARGO_GROUPED:onleaveUnBoarding( Event, From, To, ToPointVec2 ) end --- UnBoard Event. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 ToPointVec2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onafterUnBoarding( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) self:__UnLoad( 1, ToPointVec2 ) @@ -25357,17 +25357,17 @@ end --- Enter UnLoaded State. --- @param #CARGO_GROUPED self +-- @param #AI_CARGO_GROUPED self -- @param Core.Point#POINT_VEC2 -- @param #string Event -- @param #string From -- @param #string To -function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) +function AI_CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) self:F( { ToPointVec2, Event, From, To } ) if From == "Loaded" then - -- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2 + -- For each Cargo object within the AI_CARGO_GROUPED, route each object to the CargoLoadPointVec2 self.CargoSet:ForEach( function( Cargo ) Cargo:UnLoad( ToPointVec2 ) @@ -25378,7 +25378,7 @@ function CARGO_GROUPED:onenterUnLoaded( Event, From, To, ToPointVec2 ) end -end -- CARGO_GROUPED +end -- AI_CARGO_GROUPED diff --git a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz index 48cdd439f..a8b1d54d1 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz and b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz differ diff --git a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz index 4eaa7bdb5..9268dd90d 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz and b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz differ diff --git a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz index 5bdf8e1db..a3aa76e86 100644 Binary files a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz and b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua index 4aec78cf6..bf9376140 100644 --- a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua +++ b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua @@ -21,7 +21,7 @@ -- -- # Status: TESTED 07 Dec 2016 -- --- @module TEST.AIBALANCER.T001 +-- @module TEST.AI_BALANCER.T001 -- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ):FilterStart() @@ -31,5 +31,5 @@ local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCa -- If a blocked plane exists, this red plane will be ReSpawned. local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) --- Start the AIBALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -local RU_AI_Balancer = AIBALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz index 5bed8d605..a7d029212 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 -Spawned AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua index 9ac9be889..fa68376cb 100644 --- a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua +++ b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua @@ -22,7 +22,7 @@ -- -- # Status: DEVELOP 07 Dec 2016 -- --- @module TEST.AIBALANCER.T002 +-- @module TEST.AI_BALANCER.T002 -- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ):FilterStart() @@ -32,8 +32,8 @@ local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCa -- If a blocked plane exists, this red plane will be ReSpawned. local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) --- Start the AIBALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -local RU_AI_Balancer = AIBALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) +-- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. +local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) function RU_AI_Balancer:OnAfterSpawned( SetGroup, Event, From, To, AIGroup ) @@ -41,7 +41,7 @@ function RU_AI_Balancer:OnAfterSpawned( SetGroup, Event, From, To, AIGroup ) local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) - local Patrol = PATROLZONE:New( PatrolZone, 3000, 6000, 400, 600 ) + local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 400, 600 ) Patrol:ManageFuel( 0.2, 60 ) Patrol:SetControllable( AIGroup ) Patrol:__Start( 5 ) diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz index 2eb30e601..f579a7971 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua index 573efc284..ff37d8cdd 100644 --- a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua +++ b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua @@ -2,11 +2,11 @@ local US_PlanesClientSet = SET_CLIENT:New():FilterCountries( "USA" ):FilterCategories( "plane" ):FilterStart() local US_PlanesSpawn = SPAWN:New( "AI US" ):InitCleanUp( 20 ) -local US_AI_Balancer = AIBALANCER:New( US_PlanesClientSet, US_PlanesSpawn ) +local US_AI_Balancer = AI_BALANCER:New( US_PlanesClientSet, US_PlanesSpawn ) local RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ):FilterStart() local RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) -local RU_AI_Balancer = AIBALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) +local RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) local RU_AirbasesSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() RU_AirbasesSet:Flush() @@ -15,10 +15,10 @@ RU_AI_Balancer:ReturnToNearestAirbases( 10000, RU_AirbasesSet ) --local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Blue" ) --local PatrolZoneBlue = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) ---local PatrolZoneB = PATROLZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) +--local PatrolZoneB = AI_PATROLZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) --US_AI_Balancer:SetPatrolZone( PatrolZoneB ) -- --local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Red" ) --local PatrolZoneRed = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) ---local PatrolZoneR = PATROLZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) +--local PatrolZoneR = AI_PATROLZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) --RU_AI_Balancer:SetPatrolZone( PatrolZoneR ) diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz index 6b712a8ad..3a641c641 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua index 3025639fb..b4a1e62f4 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua @@ -1,6 +1,6 @@ local CargoEngineer = UNIT:FindByName( "Engineer" ) -local InfantryCargo = CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) +local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz index 8d9253fc0..928af9d98 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua index 096577fd8..ff8716a23 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua @@ -1,6 +1,6 @@ local CargoEngineer = UNIT:FindByName( "Engineer" ) -local InfantryCargo = CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) +local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz index db674c4b5..5e1a54bf1 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua index 4dc304c15..b5eb57036 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua @@ -1,6 +1,6 @@ local CargoEngineer = UNIT:FindByName( "Engineer" ) -local InfantryCargo = CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) +local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz index 5b34356cf..77df5dd47 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua index 3c101175d..355680ed9 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua @@ -1,11 +1,11 @@ local CargoSet = SET_BASE:New() -CargoSet:Add( "Engineer1", CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) -CargoSet:Add( "Engineer2", CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) -CargoSet:Add( "Engineer3", CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) -CargoSet:Add( "Engineer4", CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) +CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) +CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) +CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) +CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) -local InfantryCargo = CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) +local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz index 5a41e7f46..47444a5bf 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua index 4849e658c..26693a557 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua @@ -1,11 +1,11 @@ local CargoSet = SET_BASE:New() -CargoSet:Add( "Engineer1", CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) -CargoSet:Add( "Engineer2", CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) -CargoSet:Add( "Engineer3", CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) -CargoSet:Add( "Engineer4", CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) +CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) +CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) +CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) +CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) -local InfantryCargo = CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) +local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz index f3707521f..d3eafecd5 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua index a69e5c482..06968a6da 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua @@ -1,11 +1,11 @@ local CargoSet = SET_BASE:New() -CargoSet:Add( "Engineer1", CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) -CargoSet:Add( "Engineer2", CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) -CargoSet:Add( "Engineer3", CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) -CargoSet:Add( "Engineer4", CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) +CargoSet:Add( "Engineer1", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer1" ), "Engineers", "Engineer", 81, 2000, 25 ) ) +CargoSet:Add( "Engineer2", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer2" ), "Engineers", "Engineer", 64, 2000, 25 ) ) +CargoSet:Add( "Engineer3", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer3" ), "Engineers", "Engineer", 72, 2000, 25 ) ) +CargoSet:Add( "Engineer4", AI_CARGO_UNIT:New( UNIT:FindByName( "Engineer4" ), "Engineers", "Engineer", 69, 2000, 25 ) ) -local InfantryCargo = CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) +local InfantryCargo = AI_CARGO_GROUPED:New( CargoSet, "Engineers", "Engineers", 2000, 25 ) local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz index d712296fd..6a38c9367 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua index d68971c21..91f6b537f 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua @@ -1,6 +1,6 @@ local DeliveryUnit = UNIT:FindByName( "Delivery" ) -local Letter = CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) +local Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz index 98bd8f6f0..cc0ab2664 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua index a80062fd0..a611c8ad6 100644 --- a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua +++ b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua @@ -1,6 +1,6 @@ local CargoEngineer = UNIT:FindByName( "Engineer" ) -local InfantryCargo = CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) +local InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) local CargoCarrier = UNIT:FindByName( "Carrier" ) diff --git a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz index e1757c9ef..c9b37144a 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz index e7964493a..e72284e0c 100644 Binary files a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz and b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz index 562acfbd6..48e2d4d4f 100644 Binary files a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz and b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz differ diff --git a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz index fcaba4d8f..7303511a3 100644 Binary files a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz and b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz index bb57fa757..8d3cefbbc 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz and b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz index 93f753172..d2c5679c9 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz and b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz index f593db07b..b32feac07 100644 Binary files a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz and b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz index 7f555a15d..d3ca7eea0 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz and b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz index 4ad5ee076..d64a196dc 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz and b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz index 64294e650..cdf2f7527 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz and b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz differ diff --git a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz index 5568d47da..14d80023e 100644 Binary files a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz and b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz differ diff --git a/Moose Test Missions/MOOSE_Test_Template.miz b/Moose Test Missions/MOOSE_Test_Template.miz index 8737cbea5..56ca68cd5 100644 Binary files a/Moose Test Missions/MOOSE_Test_Template.miz and b/Moose Test Missions/MOOSE_Test_Template.miz differ diff --git a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua index b33b25e70..2c35574c8 100644 --- a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua +++ b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua @@ -1,6 +1,6 @@ --- This test mission models the behaviour of the PATROLZONE class. +-- This test mission models the behaviour of the AI_PATROLZONE class. -- --- It creates a 2 PATROLZONE objects with the name Patrol1 and Patrol2. +-- It creates a 2 AI_PATROLZONE objects with the name Patrol1 and Patrol2. -- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h. -- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base. -- @@ -23,16 +23,16 @@ local PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 ) local PatrolSpawn = SPAWN:New( "Patrol Group" ) local PatrolGroup = PatrolSpawn:Spawn() -local Patrol1 = PATROLZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) +local Patrol1 = AI_PATROLZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) Patrol1:ManageFuel( 0.2, 60 ) Patrol1:SetControllable( PatrolGroup ) Patrol1:__Start( 5 ) -local Patrol2 = PATROLZONE:New( PatrolZone2, 600, 1000, 300, 400 ) +local Patrol2 = AI_PATROLZONE:New( PatrolZone2, 600, 1000, 300, 400 ) Patrol2:ManageFuel( 0.2, 0 ) --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup -- @return #boolean If false is returned, then the OnAfter state transition function will not be called. function Patrol1:OnBeforeRTB( AIGroup ) @@ -40,7 +40,7 @@ function Patrol1:OnBeforeRTB( AIGroup ) end --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param Process_PatrolCore.Zone#PATROLZONE self +-- @param Process_PatrolCore.Zone#AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup function Patrol1:OnAfterRTB( AIGroup ) local NewGroup = PatrolSpawn:Spawn() @@ -49,14 +49,14 @@ function Patrol1:OnAfterRTB( AIGroup ) end --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param Process_PatrolCore.Zone#PATROLZONE self +-- @param Process_PatrolCore.Zone#AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup function Patrol1:OnAfterPatrol( AIGroup ) AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 ) end --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param #PATROLZONE self +-- @param #AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup -- @return #boolean If false is returned, then the OnAfter state transition function will not be called. function Patrol2:OnBeforeRTB( AIGroup ) @@ -64,7 +64,7 @@ function Patrol2:OnBeforeRTB( AIGroup ) end --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param Process_PatrolCore.Zone#PATROLZONE self +-- @param Process_PatrolCore.Zone#AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup function Patrol2:OnAfterRTB( AIGroup ) local NewGroup = PatrolSpawn:Spawn() @@ -73,7 +73,7 @@ function Patrol2:OnAfterRTB( AIGroup ) end --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param Process_PatrolCore.Zone#PATROLZONE self +-- @param Process_PatrolCore.Zone#AI_PATROLZONE self -- @param Wrapper.Group#GROUP AIGroup function Patrol2:OnAfterPatrol( AIGroup ) AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 ) diff --git a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz index dd082da9d..a750a80e3 100644 Binary files a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz and b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz index 815610bda..cdd67e9ba 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz index 950ab8307..4269e3141 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz index 387a72325..98263f585 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz index bf5ee69af..7967b4026 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz index 952828e46..67dde599f 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz and b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz index f0b44f713..f689f3988 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz index b1883f6dd..e8130b2c7 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz index f18ccfcc9..e18bef886 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz index d50c6de4b..d3e1c04bd 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz index 5e4f92438..cf7236875 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz differ diff --git a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz index 368d06cee..0a240c859 100644 Binary files a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz and b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz index a45784f92..39932e811 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz and b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz index 1e795ce4e..0245a4547 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz and b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz index 8e72bc66e..6b19bddef 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz index fffacfa61..40dbc6dd4 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz index 5e5409429..5aa4e2919 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz and b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz index 9e0739bd6..081a9339a 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz and b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz index 5c37c38b6..6c446ec42 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz and b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz index 0c7643107..1bc0f71d1 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz and b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz index 27d6aacb9..85a58cd78 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz index 0c6e833d5..b95aba2de 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz differ diff --git a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz index e996174c3..0c0d7d78d 100644 Binary files a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz and b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz index 8d5e6d64f..4226a86c8 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.lua b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.lua index 28bf2a9d8..e9a776183 100644 --- a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.lua +++ b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.lua @@ -25,11 +25,11 @@ do Cargo_Pickup_Zone_2 = CARGO_ZONE:New( 'Pickup Zone 2', 'DE Communication Center 2' ):RedSmoke() for CargoItem = 1, 2 do - CargoTable[CargoItem] = CARGO_GROUP:New( 'Engineers', 'Team ' .. EngineerNames[CargoItem], math.random( 70, 100 ) * 3, 'DE Infantry', Cargo_Pickup_Zone_1 ) + CargoTable[CargoItem] = AI_CARGO_GROUP:New( 'Engineers', 'Team ' .. EngineerNames[CargoItem], math.random( 70, 100 ) * 3, 'DE Infantry', Cargo_Pickup_Zone_1 ) end for CargoItem = 3, 5 do - CargoTable[CargoItem] = CARGO_GROUP:New( 'Engineers', 'Team ' .. EngineerNames[CargoItem], math.random( 70, 100 ) * 3, 'DE Infantry', Cargo_Pickup_Zone_2 ) + CargoTable[CargoItem] = AI_CARGO_GROUP:New( 'Engineers', 'Team ' .. EngineerNames[CargoItem], math.random( 70, 100 ) * 3, 'DE Infantry', Cargo_Pickup_Zone_2 ) end --Cargo_Package = CARGO_INVISIBLE:New( 'Letter', 0.1, 'DE Secret Agent', 'Pickup Zone Package' ) @@ -68,7 +68,7 @@ do Package_Pickup_Zone = CARGO_ZONE:New( 'Package Pickup Zone', 'DE Guard' ):GreenSmoke() - Cargo_Package = CARGO_PACKAGE:New( 'Letter', 'Letter to Command', 0.1, Client_Package_1 ) + Cargo_Package = AI_CARGO_PACKAGE:New( 'Letter', 'Letter to Command', 0.1, Client_Package_1 ) --Cargo_Goods = CARGO_STATIC:New( 'Goods', 20, 'Goods', 'Pickup Zone Goods', 'DE Collection Point' ) --Cargo_SlingLoad = CARGO_SLING:New( 'Basket', 40, 'Basket', 'Pickup Zone Sling Load', 'DE Cargo Guard' ) diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz index aec9d0296..1a15d084c 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz index 64466be6a..d5b6201d3 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz index 653cce9a5..ec10bb063 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz index 43e724427..7a4a994e6 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz index 62fa626d8..9319318e6 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz index 791d5de0e..74f3d898f 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz differ diff --git a/Moose Training/Documentation/AI_Balancer.html b/Moose Training/Documentation/AI_Balancer.html new file mode 100644 index 000000000..95bdbfe1c --- /dev/null +++ b/Moose Training/Documentation/AI_Balancer.html @@ -0,0 +1,641 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_Balancer

+ +

This module contains the AI_BALANCER class.

+ + + +
+ +

1) AI.AIBalancer#AIBALANCER class, extends Core.Fsm#FSM_SET

+

The AI.AIBalancer#AIBALANCER class monitors and manages as many AI GROUPS as there are +CLIENTS in a SETCLIENT collection not occupied by players. +The AIBALANCER class manages internally a collection of AI management objects, which govern the behaviour +of the underlying AI GROUPS.

+ +

The parent class Core.Fsm#FSM_SET manages the functionality to control the Finite State Machine (FSM) +and calls for each event the state transition methods providing the internal Core.Fsm#FSM_SET.Set object containing the +SET_GROUP and additional event parameters provided during the event.

+ +

1.1) AI_BALANCER construction method

+

Create a new AI_BALANCER object with the AI_BALANCER.New method:

+ + + +

1.2)

+

* Add + * Remove

+ +

1.2) AI_BALANCER returns AI to Airbases

+

You can configure to have the AI to return to:

+ + + +

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:

+ +

2016-08-17: SPAWN:InitCleanUp( SpawnCleanUpInterval ) replaces SPAWN:CleanUp( SpawnCleanUpInterval )

+ +
    +
  • Want to ensure that the methods starting with Init are the first called methods before any Spawn method is called!
  • +
  • This notation makes it now more clear which methods are initialization methods and which methods are Spawn enablement methods.
  • +
+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Dutch_Baron (James): Who you can search on the Eagle Dynamics Forums.
    + Working together with James has resulted in the creation of the AI_BALANCER class.
    + James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)

  • +
  • SNAFU: + Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. + None of the script code has been used however within the new AI_BALANCER moose class.

  • +
+ +

Authors:

+ +
    +
  • FlightControl: Framework Design & Programming
  • +
+ + +

Global(s)

+ + + + + +
AI_BALANCER + +
+

Type AI_BALANCER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_BALANCER.AIGroups + +
AI_BALANCER.ClassName + +
AI_BALANCER:New(SetClient, SpawnAI) +

Creates a new AI_BALANCER object

+
AI_BALANCER.PatrolZones + +
AI_BALANCER.ReturnAirbaseSet + +
AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) +

Returns the AI to the home Wrapper.Airbase#AIRBASE.

+
AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) +

Returns the AI to the nearest friendly Wrapper.Airbase#AIRBASE.

+
AI_BALANCER.ReturnTresholdRange + +
AI_BALANCER.SetClient + +
AI_BALANCER.ToHomeAirbase + +
AI_BALANCER.ToNearestAirbase + +
AI_BALANCER:onenterDestroying(SetGroup, AIGroup, Event, From, To) + +
AI_BALANCER:onenterMonitoring(SetGroup) + +
AI_BALANCER:onenterReturning(SetGroup, AIGroup, Event, From, To) + +
AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, Event, From, To) + +
+ +

Global(s)

+
+
+ + #AI_BALANCER + +AI_BALANCER + +
+
+ + + +
+
+

Type AI_Balancer

+ +

Type AI_BALANCER

+ +

AI_BALANCER class

+ +

Field(s)

+
+
+ + + +AI_BALANCER.AIGroups + +
+
+ + + +
+
+
+
+ + #string + +AI_BALANCER.ClassName + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:New(SetClient, SpawnAI) + +
+
+ +

Creates a new AI_BALANCER object

+ +

Parameters

+
    +
  • + +

    Core.Set#SET_CLIENT SetClient : +A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).

    + +
  • +
  • + +

    Functional.Spawn#SPAWN SpawnAI : +The default Spawn object to spawn new AI Groups when needed.

    + +
  • +
+

Return value

+ +

#AI_BALANCER:

+ + +

Usage:

+
-- Define a new AI_BALANCER Object.
+ +
+
+
+
+ + + +AI_BALANCER.PatrolZones + +
+
+ + + +
+
+
+
+ + + +AI_BALANCER.ReturnAirbaseSet + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) + +
+
+ +

Returns the AI to the home Wrapper.Airbase#AIRBASE.

+ +

Parameter

+ +
+
+
+
+ + +AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) + +
+
+ +

Returns the AI to the nearest friendly Wrapper.Airbase#AIRBASE.

+ +

Parameters

+ +
+
+
+
+ + + +AI_BALANCER.ReturnTresholdRange + +
+
+ + + +
+
+
+
+ + Core.Set#SET_CLIENT + +AI_BALANCER.SetClient + +
+
+ + + +
+
+
+
+ + #boolean + +AI_BALANCER.ToHomeAirbase + +
+
+ + + +
+
+
+
+ + #boolean + +AI_BALANCER.ToNearestAirbase + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:onenterDestroying(SetGroup, AIGroup, Event, From, To) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +AI_BALANCER:onenterMonitoring(SetGroup) + +
+
+ + + +

Parameter

+
    +
  • + +

    SetGroup :

    + +
  • +
+
+
+
+
+ + +AI_BALANCER:onenterReturning(SetGroup, AIGroup, Event, From, To) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, Event, From, To) + +
+
+ + + +

Parameters

+ +
+
+ +
+ +
+ + diff --git a/Moose Training/Documentation/Account.html b/Moose Training/Documentation/Account.html index fbd3a867e..c7fd789ae 100644 --- a/Moose Training/Documentation/Account.html +++ b/Moose Training/Documentation/Account.html @@ -17,7 +17,7 @@ index
@@ -89,16 +91,16 @@
-

#ACCOUNT FSM class, extends Process#PROCESS

+

#ACT_ACCOUNT FSM class, extends Core.Fsm#FSM_PROCESS

-

ACCOUNT state machine:

+

ACT_ACCOUNT state machine:

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. Each derived class follows exactly the same process, using the same events and following the same state transitions, but will have different implementation behaviour upon each event or state transition.

-

ACCOUNT Events:

+

ACT_ACCOUNT Events:

These are the events defined in this class:

@@ -110,7 +112,7 @@ but will have different implementation behaviour upon each even
  • NoMore: There are no more DCS events that need to be accounted for. The process will go into the Success state.
  • -

    ACCOUNT Event methods:

    +

    ACT_ACCOUNT Event methods:

    Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

    @@ -120,7 +122,7 @@ There are two types of event methods, which you can use to influence the normal
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • -

    ACCOUNT States:

    +

    ACT_ACCOUNT States:

    diff --git a/Moose Training/Documentation/Airbase.html b/Moose Training/Documentation/Airbase.html index caebbfa9d..466ac9524 100644 --- a/Moose Training/Documentation/Airbase.html +++ b/Moose Training/Documentation/Airbase.html @@ -17,7 +17,7 @@ index
    @@ -89,7 +91,7 @@
    -

    1) Airbase#AIRBASE class, extends Positionable#POSITIONABLE

    +

    1) Wrapper.Airbase#AIRBASE class, extends Wrapper.Positionable#POSITIONABLE

    The AIRBASE class is a wrapper class to handle the DCS Airbase objects:

    Return value

    -

    Airbase#AIRBASE: +

    Wrapper.Airbase#AIRBASE: self

    @@ -316,7 +318,7 @@ The name of the airbase.

    Return value

    -

    Airbase#AIRBASE:

    +

    Wrapper.Airbase#AIRBASE:

    diff --git a/Moose Training/Documentation/AirbasePolice.html b/Moose Training/Documentation/AirbasePolice.html index c8f0892d7..5a8018037 100644 --- a/Moose Training/Documentation/AirbasePolice.html +++ b/Moose Training/Documentation/AirbasePolice.html @@ -17,7 +17,7 @@ index
    @@ -89,8 +91,8 @@
    -

    1) AirbasePolice#AIRBASEPOLICE_BASE class, extends Base#BASE

    -

    The AirbasePolice#AIRBASEPOLICE_BASE class provides the main methods to monitor CLIENT behaviour at airbases. +

    1) Functional.AirbasePolice#AIRBASEPOLICE_BASE class, extends Core.Base#BASE

    +

    The Functional.AirbasePolice#AIRBASEPOLICE_BASE class provides the main methods to monitor CLIENT behaviour at airbases. CLIENTS should not be allowed to:

    -

    2) AirbasePolice#AIRBASEPOLICE_CAUCASUS class, extends AirbasePolice#AIRBASEPOLICE_BASE

    +

    2) Functional.AirbasePolice#AIRBASEPOLICE_CAUCASUS class, extends Functional.AirbasePolice#AIRBASEPOLICE_BASE

    All the airbases on the caucasus map can be monitored using this class. If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. The following names can be given: @@ -126,7 +128,7 @@ The following names can be given: * TbilisiLochini * Vaziani

    -

    3) AirbasePolice#AIRBASEPOLICE_NEVADA class, extends AirbasePolice#AIRBASEPOLICE_BASE

    +

    3) Functional.AirbasePolice#AIRBASEPOLICE_NEVADA class, extends Functional.AirbasePolice#AIRBASEPOLICE_BASE

    All the airbases on the NEVADA map can be monitored using this class. If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. The following names can be given: @@ -272,7 +274,7 @@ The following names can be given:

    - Set#SET_CLIENT + Core.Set#SET_CLIENT AIRBASEPOLICE_BASE.SetClient @@ -291,7 +293,7 @@ The following names can be given:
    - Set#SET_CLIENT + Core.Set#SET_CLIENT AIRBASEPOLICE_CAUCASUS.SetClient diff --git a/Moose Training/Documentation/Assign.html b/Moose Training/Documentation/Assign.html index 93eb68b42..44c1d0ace 100644 --- a/Moose Training/Documentation/Assign.html +++ b/Moose Training/Documentation/Assign.html @@ -17,7 +17,7 @@ index
    @@ -89,246 +91,300 @@
    -

    1) #ASSIGN_ACCEPT class, extends Process#PROCESS

    -

    The #ASSIGN_ACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.

    +

    #ACT_ASSIGN FSM template class, extends Core.Fsm#FSM_PROCESS

    -

    1.1) ASSIGN_ACCEPT constructor:

    +

    ACT_ASSIGN state machine:

    + +

    This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. +All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. +Each derived class follows exactly the same process, using the same events and following the same state transitions, +but will have different implementation behaviour upon each event or state transition.

    + +

    ACT_ASSIGN Events:

    + +

    These are the events defined in this class:

    -

    1.2) ASSIGN_ACCEPT state machine:

    -

    The ASSIGN_ACCEPT is a state machine: it manages the different events and states of the Controllable it is controlling.

    +

    ACT_ASSIGN Event methods:

    -

    1.2.1) ASSIGN_ACCEPT Events:

    +

    Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. +There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

    -

    1.2.2) ASSIGN_ACCEPT States:

    +

    ACT_ASSIGN States:

    -

    1.2.3) ASSIGN_ACCEPT state transition functions:

    +

    (*) End states of the process.

    + +

    ACT_ASSIGN state transition methods:

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition functions will be called by the state machine:

    +There are 2 moments when state transition methods will be called by the state machine:

    -

    1.3) Manage the ASSIGN_ACCEPT parameters:

    -

    The following methods are available to modify the parameters of a ASSIGN_ACCEPT object:

    -
    -

    2) #ASSIGNMENUACCEPT class, extends Process#PROCESS

    -

    The #ASSIGNMENUACCEPT class accepts a task when the player accepts the task through an added menu option. +

    1) #ACTASSIGNACCEPT class, extends Fsm.Assign#ACT_ASSIGN

    + +

    The ACTASSIGNACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.

    + +

    1.1) ACTASSIGNACCEPT constructor:

    + + + +
    + +

    2) #ACTASSIGNMENU_ACCEPT class, extends Fsm.Assign#ACT_ASSIGN

    + +

    The ACTASSIGNMENU_ACCEPT class accepts a task when the player accepts the task through an added menu option. This assignment type is useful to conditionally allow the player to choose whether or not he would accept the task. The assignment type also allows to reject the task.

    -

    1.1) ASSIGNMENUACCEPT constructor:

    +

    2.1) ACTASSIGNMENU_ACCEPT constructor:

    +
    -

    1.2) ASSIGNMENUACCEPT state machine:

    -

    The ASSIGNMENUACCEPT is a state machine: it manages the different events and states of the Controllable it is controlling.

    - -

    1.2.1) ASSIGNMENUACCEPT Events:

    - - - -

    1.2.2) ASSIGNMENUACCEPT States:

    - - - -

    1.2.3) ASSIGNMENUACCEPT state transition functions:

    - -

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition functions will be called by the state machine:

    - - - -

    1.3) Manage the ASSIGNMENUACCEPT parameters:

    -

    The following methods are available to modify the parameters of a ASSIGNMENUACCEPT object:

    +

    Global(s)

    - + - + + + + +
    ASSIGN_ACCEPTACT_ASSIGN
    ASSIGN_MENU_ACCEPTACT_ASSIGN_ACCEPT + +
    ACT_ASSIGN_MENU_ACCEPT
    -

    Type ASSIGN_ACCEPT

    +

    Type ACT_ASSIGN

    - + - + - + - + - - - - - +
    ASSIGN_ACCEPT.ClassNameACT_ASSIGN.ClassName
    ASSIGN_ACCEPT:New(ProcessUnit, TaskBriefing)ACT_ASSIGN:New()

    Creates a new task assignment state machine.

    ASSIGN_ACCEPT.ProcessUnitACT_ASSIGN.ProcessUnit
    ASSIGN_ACCEPT.TargetZoneACT_ASSIGN.TargetZone
    ASSIGN_ACCEPT.Task - -
    ASSIGN_ACCEPT.TaskBriefingACT_ASSIGN.Task
    -

    Type ASSIGN_MENU_ACCEPT

    +

    Type ACT_ASSIGN_ACCEPT

    - + - + - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - - + - + + + +
    ASSIGN_MENU_ACCEPT.ClassNameACT_ASSIGN_ACCEPT.ClassName
    ASSIGN_MENU_ACCEPT.MenuACT_ASSIGN_ACCEPT:Init(FsmAssign)
    ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
    ASSIGN_MENU_ACCEPT:MenuAssign() -

    Menu function.

    -
    ASSIGN_MENU_ACCEPT:MenuReject() -

    Menu function.

    -
    ASSIGN_MENU_ACCEPT.MenuRejectTask - -
    ASSIGN_MENU_ACCEPT:New(ProcessUnit, TaskBriefing, TaskName)ACT_ASSIGN_ACCEPT:New(TaskBriefing)

    Creates a new task assignment state machine.

    ASSIGN_MENU_ACCEPT.ProcessUnitACT_ASSIGN_ACCEPT.ProcessUnit
    ASSIGN_MENU_ACCEPT.TargetZoneACT_ASSIGN_ACCEPT.TargetZone
    ASSIGN_MENU_ACCEPT.TaskACT_ASSIGN_ACCEPT.Task
    ASSIGN_MENU_ACCEPT.TaskBriefingACT_ASSIGN_ACCEPT.TaskBriefing
    ASSIGN_MENU_ACCEPT.TaskName - -
    ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To)ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To)

    StateMachine callback function

    ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To)ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) +

    StateMachine callback function

    +
    + +

    Type ACT_ASSIGN_MENU_ACCEPT

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + @@ -339,9 +395,9 @@ There are 2 moments when state transition functions will be called by the state
    - #ASSIGN_ACCEPT - -ASSIGN_ACCEPT + #ACT_ASSIGN + +ACT_ASSIGN
    @@ -353,9 +409,23 @@ There are 2 moments when state transition functions will be called by the state
    - #ASSIGN_MENU_ACCEPT - -ASSIGN_MENU_ACCEPT + #ACT_ASSIGN_ACCEPT + +ACT_ASSIGN_ACCEPT + +
    +
    + + + +
    +
    +
    +
    + + #ACT_ASSIGN_MENU_ACCEPT + +ACT_ASSIGN_MENU_ACCEPT
    @@ -366,17 +436,17 @@ There are 2 moments when state transition functions will be called by the state

    Type Assign

    -

    Type ASSIGN_ACCEPT

    +

    Type ACT_ASSIGN

    -

    ASSIGN_ACCEPT class

    +

    ACT_ASSIGN class

    Field(s)

    #string - -ASSIGN_ACCEPT.ClassName + +ACT_ASSIGN.ClassName
    @@ -388,8 +458,8 @@ There are 2 moments when state transition functions will be called by the state
    - -ASSIGN_ACCEPT:New(ProcessUnit, TaskBriefing) + +ACT_ASSIGN:New()
    @@ -399,22 +469,9 @@ There are 2 moments when state transition functions will be called by the state

    The process will accept the task by default, no player intervention accepted.

    -

    Parameters

    -
      -
    • - -

      Unit#UNIT ProcessUnit :

      - -
    • -
    • - -

      #string TaskBriefing :

      - -
    • -

    Return value

    -

    #ASSIGN_ACCEPT: +

    #ACT_ASSIGN: The task acceptance process.

    @@ -422,9 +479,9 @@ The task acceptance process.

    - Unit#UNIT - -ASSIGN_ACCEPT.ProcessUnit + Wrapper.Unit#UNIT + +ACT_ASSIGN.ProcessUnit
    @@ -436,9 +493,9 @@ The task acceptance process.

    - Zone#ZONE_BASE - -ASSIGN_ACCEPT.TargetZone + Core.Zone#ZONE_BASE + +ACT_ASSIGN.TargetZone
    @@ -450,23 +507,9 @@ The task acceptance process.

    - Task#TASK_BASE - -ASSIGN_ACCEPT.Task - -
    -
    - - - -
    -
    -
    -
    - - - -ASSIGN_ACCEPT.TaskBriefing + Tasking.Task#TASK + +ACT_ASSIGN.Task
    @@ -476,17 +519,17 @@ The task acceptance process.

    -

    Type ASSIGN_MENU_ACCEPT

    +

    Type ACT_ASSIGN_ACCEPT

    -

    ASSIGNMENUACCEPT class

    +

    ACTASSIGNACCEPT class

    Field(s)

    #string - -ASSIGN_MENU_ACCEPT.ClassName + +ACT_ASSIGN_ACCEPT.ClassName
    @@ -498,76 +541,29 @@ The task acceptance process.

    - - -ASSIGN_MENU_ACCEPT.Menu + +ACT_ASSIGN_ACCEPT:Init(FsmAssign)
    +

    Parameter

    +
      +
    • + +

      FsmAssign :

      + +
    • +
    - - -ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
    -
    - - - -
    -
    -
    -
    - - -ASSIGN_MENU_ACCEPT:MenuAssign() - -
    -
    - -

    Menu function.

    - -
    -
    -
    -
    - - -ASSIGN_MENU_ACCEPT:MenuReject() - -
    -
    - -

    Menu function.

    - -
    -
    -
    -
    - - - -ASSIGN_MENU_ACCEPT.MenuRejectTask - -
    -
    - - - -
    -
    -
    -
    - - -ASSIGN_MENU_ACCEPT:New(ProcessUnit, TaskBriefing, TaskName) + +ACT_ASSIGN_ACCEPT:New(TaskBriefing)
    @@ -575,29 +571,282 @@ The task acceptance process.

    Creates a new task assignment state machine.

    -

    The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

    +

    The process will accept the task by default, no player intervention accepted.

    + +

    Parameter

    +
      +
    • + +

      #string TaskBriefing :

      + +
    • +
    +
    +
    +
    +
    + + Wrapper.Unit#UNIT + +ACT_ASSIGN_ACCEPT.ProcessUnit + +
    +
    + + + +
    +
    +
    +
    + + Core.Zone#ZONE_BASE + +ACT_ASSIGN_ACCEPT.TargetZone + +
    +
    + + + +
    +
    +
    +
    + + Tasking.Task#TASK + +ACT_ASSIGN_ACCEPT.Task + +
    +
    + + + +
    +
    +
    +
    + + + +ACT_ASSIGN_ACCEPT.TaskBriefing + +
    +
    + + + +
    +
    +
    +
    + + +ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) + +
    +
    + +

    StateMachine callback function

    Parameters

    • -

      Unit#UNIT ProcessUnit :

      +

      Wrapper.Unit#UNIT ProcessUnit :

      + +
    • +
    • + +

      #string Event :

      + +
    • +
    • + +

      #string From :

      + +
    • +
    • + +

      #string To :

      + +
    • +
    +
    +
    +
    +
    + + +ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) + +
    +
    + +

    StateMachine callback function

    + +

    Parameters

    +
      +
    • + +

      Wrapper.Unit#UNIT ProcessUnit :

      + +
    • +
    • + +

      #string Event :

      + +
    • +
    • + +

      #string From :

      + +
    • +
    • + +

      #string To :

      + +
    • +
    +
    +
    + +

    Type ACT_ASSIGN_MENU_ACCEPT

    + +

    ACTASSIGNMENU_ACCEPT class

    + +

    Field(s)

    +
    +
    + + #string + +ACT_ASSIGN_MENU_ACCEPT.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      FsmAssign :

      + +
    • +
    +
    +
    +
    +
    + + + +ACT_ASSIGN_MENU_ACCEPT.Menu + +
    +
    + + + +
    +
    +
    +
    + + + +ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask + +
    +
    + + + +
    +
    +
    +
    + + +ACT_ASSIGN_MENU_ACCEPT:MenuAssign() + +
    +
    + +

    Menu function.

    + +
    +
    +
    +
    + + +ACT_ASSIGN_MENU_ACCEPT:MenuReject() + +
    +
    + +

    Menu function.

    + +
    +
    +
    +
    + + + +ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask + +
    +
    + + + +
    +
    +
    +
    + + +ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) + +
    +
    + +

    Init.

    + +

    Parameters

    +
      +
    • + +

      #string TaskName :

    • #string TaskBriefing :

      -
    • -
    • - -

      TaskName :

      -

    Return value

    -

    #ASSIGNMENUACCEPT: +

    #ACTASSIGNMENU_ACCEPT: self

    @@ -605,9 +854,9 @@ self

    - Unit#UNIT - -ASSIGN_MENU_ACCEPT.ProcessUnit + Wrapper.Unit#UNIT + +ACT_ASSIGN_MENU_ACCEPT.ProcessUnit
    @@ -619,9 +868,9 @@ self

    - Zone#ZONE_BASE - -ASSIGN_MENU_ACCEPT.TargetZone + Core.Zone#ZONE_BASE + +ACT_ASSIGN_MENU_ACCEPT.TargetZone
    @@ -633,9 +882,9 @@ self

    - Task#TASK_BASE - -ASSIGN_MENU_ACCEPT.Task + Tasking.Task#TASK + +ACT_ASSIGN_MENU_ACCEPT.Task
    @@ -648,8 +897,8 @@ self

    - -ASSIGN_MENU_ACCEPT.TaskBriefing + +ACT_ASSIGN_MENU_ACCEPT.TaskBriefing
    @@ -662,8 +911,8 @@ self

    - -ASSIGN_MENU_ACCEPT.TaskName + +ACT_ASSIGN_MENU_ACCEPT.TaskName
    @@ -675,8 +924,8 @@ self

    - -ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) + +ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To)
    @@ -687,7 +936,7 @@ self

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -297,7 +443,7 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l @@ -360,12 +506,24 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l

    Set trace on or off Note that when trace is off, no debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

    + + + + + + + + + @@ -443,7 +601,7 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
    ACT_ASSIGN_MENU_ACCEPT.ClassName + +
    ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) + +
    ACT_ASSIGN_MENU_ACCEPT.Menu + +
    ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask + +
    ACT_ASSIGN_MENU_ACCEPT:MenuAssign() +

    Menu function.

    +
    ACT_ASSIGN_MENU_ACCEPT:MenuReject() +

    Menu function.

    +
    ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask + +
    ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) +

    Init.

    +
    ACT_ASSIGN_MENU_ACCEPT.ProcessUnit + +
    ACT_ASSIGN_MENU_ACCEPT.TargetZone + +
    ACT_ASSIGN_MENU_ACCEPT.Task + +
    ACT_ASSIGN_MENU_ACCEPT.TaskBriefing + +
    ACT_ASSIGN_MENU_ACCEPT.TaskName + +
    ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To)

    StateMachine callback function

    ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To)ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) +

    StateMachine callback function

    +
    ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To)

    StateMachine callback function

    BASE:Event()

    Returns the event dispatcher

    +
    BASE:EventOnBaseCaptured(EventFunction) +

    Subscribe to a SEVENTBASE_CAPTURED event.

    +
    BASE:EventOnBirth(EventFunction) +

    Subscribe to a SEVENTBIRTH event.

    +
    BASE:EventOnCrash(EventFunction) +

    Subscribe to a SEVENTCRASH event.

    +
    BASE:EventOnDead(EventFunction) +

    Subscribe to a SEVENTDEAD event.

    +
    BASE:EventOnEjection(EventFunction) +

    Subscribe to a SEVENTEJECTION event.

    +
    BASE:EventOnEngineShutdown(EventFunction) +

    Subscribe to a SEVENTENGINE_SHUTDOWN event.

    +
    BASE:EventOnEngineStartup(EventFunction) +

    Subscribe to a SEVENTENGINE_STARTUP event.

    +
    BASE:EventOnHit(EventFunction) +

    Subscribe to a SEVENTHIT event.

    +
    BASE:EventOnHumanFailure(EventFunction) +

    Subscribe to a SEVENTHUMAN_FAILURE event.

    +
    BASE:EventOnLand(EventFunction) +

    Subscribe to a SEVENTLAND event.

    +
    BASE:EventOnMissionStart(EventFunction) +

    Subscribe to a SEVENTMISSION_START event.

    +
    BASE:EventOnPilotDead(EventFunction) +

    Subscribe to a SEVENTPILOT_DEAD event.

    +
    BASE:EventOnPlayerComment(EventFunction) +

    Subscribe to a SEVENTPLAYER_COMMENT event.

    +
    BASE:EventOnPlayerEnterUnit(EventFunction) +

    Subscribe to a SEVENTPLAYERENTERUNIT event.

    +
    BASE:EventOnPlayerLeaveUnit(EventFunction) +

    Subscribe to a SEVENTPLAYERLEAVEUNIT event.

    +
    BASE:EventOnPlayerMissionEnd(EventFunction) +

    Subscribe to a SEVENTMISSION_END event.

    +
    BASE:EventOnRefueling(EventFunction) +

    Subscribe to a SEVENTREFUELING event.

    +
    BASE:EventOnRefuelingStop(EventFunction) +

    Subscribe to a SEVENTREFUELING_STOP event.

    +
    BASE:EventOnShootingEnd(EventFunction) +

    Subscribe to a SEVENTSHOOTING_END event.

    +
    BASE:EventOnShootingStart(EventFunction) +

    Subscribe to a SEVENTSHOOTING_START event.

    +
    BASE:EventOnShot(EventFunction) +

    Subscribe to a SEVENTSHOT event.

    +
    BASE:EventOnTakeOff(EventFunction) +

    Subscribe to a SEVENTTAKEOFF event.

    +
    BASE:EventOnTookControl(EventFunction) +

    Subscribe to a SEVENTTOOK_CONTROL event.

    +
    BASE:EventRemoveAll() +

    Remove all subscribed events

    BASE:New() -

    The base constructor.

    +
    BASE:_Destructor() +
    BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

    Trace a function call.

    +
    BASE:_SetDestructor() +
    - + + + + + + + + + + + + + + + + + + + + + @@ -167,501 +199,459 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the C - - - - - - - - - - - - - - - - - - - - - - - -
    CARBO_BASEAI_CARGO + +
    AI_CARGO_GROUP + +
    AI_CARGO_GROUPED + +
    AI_CARGO_PACKAGE + +
    AI_CARGO_REPRESENTABLE + +
    AI_CARGO_UNIT CARGOS -
    CARGO_GROUP - -
    CARGO_GROUPED - -
    CARGO_PACKAGE - -
    CARGO_REPRESENTABLE - -
    CARGO_UNIT - -
    FSMT -
    -

    Type CARBO_BASE

    +

    Type AI_CARGO

    - + - + - + - + - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    CARBO_BASE:Board(ToCarrier)AI_CARGO:Board(ToCarrier)

    Boards the cargo to a Carrier.

    CARBO_BASE.CargoCarrierAI_CARGO.CargoCarrier

    The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

    CARBO_BASE.CargoObjectAI_CARGO.CargoObject

    The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

    CARBO_BASE.CargoSchedulerAI_CARGO.ClassName
    CARBO_BASE.ClassName - -
    CARBO_BASE.ContainableAI_CARGO.Containable

    This flag defines if the cargo can be contained within a DCS Unit.

    CARBO_BASE:IsNear(PointVec2)AI_CARGO:IsNear(PointVec2)

    Check if CargoCarrier is near the Cargo to be Loaded.

    CARBO_BASE:Load(ToCarrier)AI_CARGO:Load(ToCarrier)

    Loads the cargo to a Carrier.

    CARBO_BASE.MoveableAI_CARGO.Moveable

    This flag defines if the cargo is moveable.

    CARBO_BASE.NameAI_CARGO.Name

    A string defining the name of the cargo. The name is the unique identifier of the cargo.

    CARBO_BASE.NearRadiusAI_CARGO.NearRadius

    (optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

    CARBO_BASE:New(Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO:New(Type, Name, Weight, ReportRadius, NearRadius) -

    CARBO_BASE Constructor.

    +

    AI_CARGO Constructor.

    CARBO_BASE:OnAfterBoarding(Controllable)AI_CARGO:OnAfterBoarding(Controllable)
    CARBO_BASE:OnAfterLoaded(Controllable)AI_CARGO:OnAfterLoaded(Controllable)
    CARBO_BASE:OnAfterUnBoarding(Controllable)AI_CARGO:OnAfterUnBoarding(Controllable)
    CARBO_BASE:OnAfterUnLoaded(Controllable)AI_CARGO:OnAfterUnLoaded(Controllable)
    CARBO_BASE:OnBeforeBoarding(Controllable)AI_CARGO:OnBeforeBoarding(Controllable)
    CARBO_BASE:OnBeforeLoaded(Controllable)AI_CARGO:OnBeforeLoaded(Controllable)
    CARBO_BASE:OnBeforeUnBoarding(Controllable)AI_CARGO:OnBeforeUnBoarding(Controllable)
    CARBO_BASE:OnBeforeUnLoaded(Controllable)AI_CARGO:OnBeforeUnLoaded(Controllable)
    CARBO_BASE.ReportRadiusAI_CARGO.ReportRadius

    (optional) A number defining the radius in meters when the cargo is signalling or reporting to a Carrier.

    CARBO_BASE.RepresentableAI_CARGO.Representable

    This flag defines if the cargo can be represented by a DCS Unit.

    CARBO_BASE.SlingloadableAI_CARGO.Slingloadable

    This flag defines if the cargo can be slingloaded.

    CARBO_BASE:Spawn(PointVec2)AI_CARGO:Spawn(PointVec2) -

    Template method to spawn a new representation of the CARBO_BASE in the simulator.

    +

    Template method to spawn a new representation of the AI_CARGO in the simulator.

    CARBO_BASE.TypeAI_CARGO.Type

    A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

    CARBO_BASE:UnBoard(ToPointVec2)AI_CARGO:UnBoard(ToPointVec2)

    UnBoards the cargo to a Carrier.

    CARBO_BASE:UnLoad(ToPointVec2)AI_CARGO:UnLoad(ToPointVec2)

    UnLoads the cargo to a Carrier.

    CARBO_BASE.WeightAI_CARGO.Weight

    A number defining the weight of the cargo. The weight is expressed in kg.

    CARBO_BASE:__Board(DelaySeconds, ToCarrier)AI_CARGO:__Board(DelaySeconds, ToCarrier)

    Boards the cargo to a Carrier.

    CARBO_BASE:__Load(DelaySeconds, ToCarrier)AI_CARGO:__Load(DelaySeconds, ToCarrier)

    Loads the cargo to a Carrier.

    CARBO_BASE:__UnBoard(DelaySeconds, ToPointVec2)AI_CARGO:__UnBoard(DelaySeconds, ToPointVec2)

    UnBoards the cargo to a Carrier.

    CARBO_BASE:__UnLoad(DelaySeconds, ToPointVec2)AI_CARGO:__UnLoad(DelaySeconds, ToPointVec2)

    UnLoads the cargo to a Carrier.

    -

    Type CARGO_GROUP

    +

    Type AI_CARGO_GROUP

    - + - + - + - +
    CARGO_GROUP.CargoSetAI_CARGO_GROUP.CargoSet

    A set of cargo objects.

    CARGO_GROUP.ClassNameAI_CARGO_GROUP.ClassName
    CARGO_GROUP.NameAI_CARGO_GROUP.Name

    A string defining the name of the cargo group. The name is the unique identifier of the cargo.

    CARGO_GROUP:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO_GROUP:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_GROUP constructor.

    +

    AICARGOGROUP constructor.

    -

    Type CARGO_GROUPED

    +

    Type AI_CARGO_GROUPED

    - + - + - + - + - + - + - + - + - +
    CARGO_GROUPED.ClassNameAI_CARGO_GROUPED.ClassName
    CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_GROUPED constructor.

    +

    AICARGOGROUPED constructor.

    CARGO_GROUPED:onafterUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_GROUPED:onafterUnBoarding(ToPointVec2, Event, From, To)

    UnBoard Event.

    CARGO_GROUPED:onenterBoarding(CargoCarrier, Event, From, To)AI_CARGO_GROUPED:onenterBoarding(CargoCarrier, Event, From, To)

    Enter Boarding State.

    CARGO_GROUPED:onenterLoaded(CargoCarrier, Event, From, To)AI_CARGO_GROUPED:onenterLoaded(CargoCarrier, Event, From, To)

    Enter Loaded State.

    CARGO_GROUPED:onenterUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_GROUPED:onenterUnBoarding(ToPointVec2, Event, From, To)

    Enter UnBoarding State.

    CARGO_GROUPED:onenterUnLoaded(Point, Event, From, To, ToPointVec2)AI_CARGO_GROUPED:onenterUnLoaded(Core, Event, From, To, ToPointVec2)

    Enter UnLoaded State.

    CARGO_GROUPED:onleaveBoarding(CargoCarrier, Event, From, To)AI_CARGO_GROUPED:onleaveBoarding(CargoCarrier, Event, From, To)

    Leave Boarding State.

    CARGO_GROUPED:onleaveUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_GROUPED:onleaveUnBoarding(ToPointVec2, Event, From, To)

    Leave UnBoarding State.

    -

    Type CARGO_PACKAGE

    +

    Type AI_CARGO_PACKAGE

    - + - + - + - + - + - + - + - + - + - + - +
    CARGO_PACKAGE.CargoCarrierAI_CARGO_PACKAGE.CargoCarrier
    CARGO_PACKAGE.CargoInAirAI_CARGO_PACKAGE.CargoInAir
    CARGO_PACKAGE.ClassNameAI_CARGO_PACKAGE.ClassName
    CARGO_PACKAGE:IsNear(CargoCarrier)AI_CARGO_PACKAGE:IsNear(CargoCarrier)

    Check if CargoCarrier is near the Cargo to be Loaded.

    CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_PACKAGE Constructor.

    +

    AICARGOPACKAGE Constructor.

    CARGO_PACKAGE:onafterLoad(FsmP, Event, From, To, CargoCarrier, Speed, LoadDistance, Angle)AI_CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle)

    Load Event.

    CARGO_PACKAGE:onafterOnBoard(FsmP, Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance)AI_CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance)

    Board Event.

    CARGO_PACKAGE:onafterOnBoarded(FsmP, Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle)AI_CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle)

    Boarded Event.

    CARGO_PACKAGE:onafterUnBoard(FsmP, Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier)AI_CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier)

    UnBoard Event.

    CARGO_PACKAGE:onafterUnBoarded(FsmP, Event, From, To, CargoCarrier, Speed)AI_CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed)

    UnBoarded Event.

    CARGO_PACKAGE:onafterUnLoad(FsmP, Event, From, To, Distance, Angle, CargoCarrier, Speed)AI_CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed)

    UnLoad Event.

    -

    Type CARGO_REPRESENTABLE

    +

    Type AI_CARGO_REPRESENTABLE

    - + - + - +
    CARGO_REPRESENTABLE.ClassNameAI_CARGO_REPRESENTABLE.ClassName
    CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_REPRESENTABLE Constructor.

    +

    AICARGOREPRESENTABLE Constructor.

    CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed)AI_CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed)

    Route a cargo unit to a PointVec2.

    -

    Type CARGO_UNIT

    +

    Type AI_CARGO_UNIT

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -672,9 +662,79 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the C
    - #CARBO_BASE - -CARBO_BASE + #AI_CARGO + +AI_CARGO + +
    +
    + + + +
    +
    +
    +
    + + #AI_CARGO_GROUP + +AI_CARGO_GROUP + +
    +
    + + + +
    +
    +
    +
    + + #AI_CARGO_GROUPED + +AI_CARGO_GROUPED + +
    +
    + + + +
    +
    +
    +
    + + #AI_CARGO_PACKAGE + +AI_CARGO_PACKAGE + +
    +
    + + + +
    +
    +
    +
    + + #AI_CARGO_REPRESENTABLE + +AI_CARGO_REPRESENTABLE + +
    +
    + + + +
    +
    +
    +
    + + #AI_CARGO_UNIT + +AI_CARGO_UNIT
    @@ -695,101 +755,17 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the C -
    -
    -
    -
    - - #CARGO_GROUP - -CARGO_GROUP - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_GROUPED - -CARGO_GROUPED - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_PACKAGE - -CARGO_PACKAGE - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_REPRESENTABLE - -CARGO_REPRESENTABLE - -
    -
    - - - -
    -
    -
    -
    - - #CARGO_UNIT - -CARGO_UNIT - -
    -
    - - - -
    -
    -
    -
    - - - -FSMT - -
    -
    - - -

    Type Cargo

    -

    Type CARBO_BASE

    +

    Type AI_CARGO

    Field(s)

    - -CARBO_BASE:Board(ToCarrier) + +AI_CARGO:Board(ToCarrier)
    @@ -804,7 +780,7 @@ The cargo must be in the UnLoaded state.

    @@ -1461,8 +1423,8 @@ The amount of seconds to delay the action.

    - -CARBO_BASE:__UnLoad(DelaySeconds, ToPointVec2) + +AI_CARGO:__UnLoad(DelaySeconds, ToPointVec2)
    @@ -1483,24 +1445,24 @@ The amount of seconds to delay the action.

  • -

    Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

    +

    Core.Point#POINT_VEC2 ToPointVec2 : +(optional) @{Core.Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

  • -

    Type CARBO_BASE.CargoObjects

    +

    Type AI_CARGO.CargoObjects

    -

    Type CARGO_GROUP

    +

    Type AI_CARGO_GROUP

    Field(s)

    Set#SET_BASE - -CARGO_GROUP.CargoSet + +AI_CARGO_GROUP.CargoSet
    @@ -1513,8 +1475,8 @@ The amount of seconds to delay the action.

    #string - -CARGO_GROUP.ClassName + +AI_CARGO_GROUP.ClassName
    @@ -1527,8 +1489,8 @@ The amount of seconds to delay the action.

    #string - -CARGO_GROUP.Name + +AI_CARGO_GROUP.Name
    @@ -1540,19 +1502,19 @@ The amount of seconds to delay the action.

    - -CARGO_GROUP:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius) + +AI_CARGO_GROUP:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)
    -

    CARGO_GROUP constructor.

    +

    AICARGOGROUP constructor.

    Parameters

    Return value

    -

    #CARGO_GROUP:

    +

    #AICARGOGROUP:

    -

    Type CARGO_GROUPED

    +

    Type AI_CARGO_GROUPED

    Field(s)

    #string - -CARGO_GROUPED.ClassName + +AI_CARGO_GROUPED.ClassName
    @@ -1610,19 +1572,19 @@ The amount of seconds to delay the action.

    - -CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius) + +AI_CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)
    -

    CARGO_GROUPED constructor.

    +

    AICARGOGROUPED constructor.

    Parameters

    Return value

    -

    #CARGO_GROUPED:

    +

    #AICARGOGROUPED:

    @@ -1663,8 +1625,8 @@ The amount of seconds to delay the action.

    - -CARGO_GROUPED:onafterUnBoarding(ToPointVec2, Event, From, To) + +AI_CARGO_GROUPED:onafterUnBoarding(ToPointVec2, Event, From, To)
    @@ -1675,7 +1637,7 @@ The amount of seconds to delay the action.

    @@ -156,7 +158,7 @@ @@ -304,7 +306,7 @@
    -

    Add the DCSUnit#Unit to the CleanUpList for CleanUp.

    +

    Add the Dcs.DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

    Parameters

    - + @@ -312,7 +314,7 @@ If the DCS Unit object does not exist or is nil, the CLIENT methods will return @@ -657,7 +659,7 @@ Text that describes the briefing of the mission when a Player logs into the Clie
    -CLIENT:FindByName(ClientName, ClientBriefing) +CLIENT:FindByName(ClientName, ClientBriefing, Error)
    @@ -680,6 +682,12 @@ Name of the DCS Unit as defined within the Mission Editor.

    #string ClientBriefing : Text that describes the briefing of the mission when a Player logs into the Client.

    + +
  • + +

    #boolean Error : +A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.

    +
  • Return value

    @@ -712,7 +720,7 @@ Text that describes the briefing of the mission when a Player logs into the Clie

    Return value

    -

    DCSTypes#Unit:

    +

    Dcs.DCSTypes#Unit:

    @@ -729,10 +737,10 @@ Text that describes the briefing of the mission when a Player logs into the Clie -

    TODO: Check DCSTypes#Group.ID +

    TODO: Check Dcs.DCSTypes#Group.ID - Get the group ID of the client. @param #CLIENT self - @return DCSTypes#Group.ID

    + @return Dcs.DCSTypes#Group.ID

    @@ -767,7 +775,7 @@ Text that describes the briefing of the mission when a Player logs into the Clie

    Return value

    -

    Unit#UNIT:

    +

    Wrapper.Unit#UNIT:

    @@ -788,7 +796,7 @@ Text that describes the briefing of the mission when a Player logs into the Clie

    Return value

    -

    DCSGroup#Group:

    +

    Dcs.DCSWrapper.Group#Group:

    @@ -866,7 +874,7 @@ is the category of the message (the title).

  • #number MessageInterval : -is the interval in seconds between the display of the Message#MESSAGE when the CLIENT is in the air.

    +is the interval in seconds between the display of the Core.Message#MESSAGE when the CLIENT is in the air.

  • @@ -976,10 +984,10 @@ self

    -

    Shows the Cargo#CARGO contained within the CLIENT to the player as a message.

    +

    Shows the AI.AI_Cargo#CARGO contained within the CLIENT to the player as a message.

    -

    The Cargo#CARGO is shown using the Message#MESSAGE distribution system.

    +

    The AI.AI_Cargo#CARGO is shown using the Core.Message#MESSAGE distribution system.

    diff --git a/Moose Training/Documentation/CommandCenter.html b/Moose Training/Documentation/CommandCenter.html new file mode 100644 index 000000000..90d69a35b --- /dev/null +++ b/Moose Training/Documentation/CommandCenter.html @@ -0,0 +1,765 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module CommandCenter

    + +

    A COMMANDCENTER is the owner of multiple missions within MOOSE.

    + + +

    A COMMANDCENTER governs multiple missions, the tasking and the reporting.

    + +

    Global(s)

    +
  • CARGO_UNIT.CargoCarrierAI_CARGO_UNIT.CargoCarrier
    CARGO_UNIT.CargoInAirAI_CARGO_UNIT.CargoInAir
    CARGO_UNIT.CargoObjectAI_CARGO_UNIT.CargoObject
    CARGO_UNIT.ClassNameAI_CARGO_UNIT.ClassName
    CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius)AI_CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) -

    CARGO_UNIT Constructor.

    +

    AICARGOUNIT Constructor.

    CARGO_UNIT.OnUnLoadedCallBackAI_CARGO_UNIT.OnUnLoadedCallBack
    CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier)AI_CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier)

    Board Event.

    CARGO_UNIT:onafterUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2)

    UnBoard Event.

    CARGO_UNIT:onenterBoarding(CargoCarrier, Event, From, To)AI_CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier)

    Enter Boarding State.

    CARGO_UNIT:onenterLoaded(CargoCarrier, Event, From, To)AI_CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier)

    Loaded State.

    CARGO_UNIT:onenterUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2)

    Enter UnBoarding State.

    CARGO_UNIT:onenterUnLoaded(Point, Event, From, To, ToPointVec2)AI_CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2)

    Enter UnLoaded State.

    CARGO_UNIT:onleaveBoarding(CargoCarrier, Event, From, To)AI_CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier)

    Leave Boarding State.

    CARGO_UNIT:onleaveUnBoarding(ToPointVec2, Event, From, To)AI_CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2)

    Leave UnBoarding State.

    CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) -

    Add the DCSUnit#Unit to the CleanUpList for CleanUp.

    +

    Add the Dcs.DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

    CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) -

    Destroys a DCSUnit#Unit from the simulator, but checks first if it is still existing!

    +

    Destroys a Dcs.DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!

    CLIENT:FindByName(ClientName, ClientBriefing)CLIENT:FindByName(ClientName, ClientBriefing, Error)

    Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

    CLIENT:ShowCargo() -

    Shows the Cargo#CARGO contained within the CLIENT to the player as a message.

    +

    Shows the AI.AI_Cargo#CARGO contained within the CLIENT to the player as a message.

    + + + + + + + + +
    COMMANDCENTER + +
    REPORT + +
    +

    Type COMMANDCENTER

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    COMMANDCENTER:AddMission(Mission) +

    Add a MISSION to be governed by the HQ command center.

    +
    COMMANDCENTER.ClassName + +
    COMMANDCENTER.CommandCenterCoalition + +
    COMMANDCENTER.CommandCenterMenu + +
    COMMANDCENTER.CommandCenterName + +
    COMMANDCENTER.CommandCenterPositionable + +
    COMMANDCENTER:GetMissions() +

    Get the Missions governed by the HQ command center.

    +
    COMMANDCENTER:GetName() +

    Gets the name of the HQ command center.

    +
    COMMANDCENTER:GetPositionable() +

    Gets the POSITIONABLE of the HQ command center.

    +
    COMMANDCENTER.HQ + +
    COMMANDCENTER:HasGroup(Wrapper, MissionGroup) +

    Checks of the COMMANDCENTER has a GROUP.

    +
    COMMANDCENTER:MessageToCoalition(Message) +

    Send a CC message to the coalition of the CC.

    +
    COMMANDCENTER:MessageToGroup(Message, TaskGroup) +

    Send a CC message to a GROUP.

    +
    COMMANDCENTER.Name + +
    COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) +

    The constructor takes an IDENTIFIABLE as the HQ command center.

    +
    COMMANDCENTER:RemoveMission(Mission) +

    Removes a MISSION to be governed by the HQ command center.

    +
    COMMANDCENTER:ReportDetails(ReportGroup, Task) +

    Report the status of a Task to a Group.

    +
    COMMANDCENTER:ReportSummary(ReportGroup) +

    Report the status of all MISSIONs to a GROUP.

    +
    COMMANDCENTER:SetMenu() +

    Sets the menu structure of the Missions governed by the HQ command center.

    +
    + +

    Type REPORT

    + + + + + + + + + + + + + + + + + +
    REPORT:Add(Text) +

    Add a new line to a REPORT.

    +
    REPORT.ClassName + +
    REPORT:New(Title) +

    Create a new REPORT.

    +
    REPORT:Text() + +
    + +

    Global(s)

    +
    +
    + + #COMMANDCENTER + +COMMANDCENTER + +
    +
    + + + +
    +
    +
    +
    + + #REPORT + +REPORT + +
    +
    + + + +
    +
    +

    Type CommandCenter

    + +

    Type COMMANDCENTER

    + +

    The COMMANDCENTER class

    + +

    Field(s)

    +
    +
    + + +COMMANDCENTER:AddMission(Mission) + +
    +
    + +

    Add a MISSION to be governed by the HQ command center.

    + +

    Parameter

    + +

    Return value

    + +

    Tasking.Mission#MISSION:

    + + +
    +
    +
    +
    + + #string + +COMMANDCENTER.ClassName + +
    +
    + + + +
    +
    +
    +
    + + Dcs.DCSCoalitionWrapper.Object#coalition + +COMMANDCENTER.CommandCenterCoalition + +
    +
    + + + +
    +
    +
    +
    + + +COMMANDCENTER.CommandCenterMenu + +
    +
    + + + +
    +
    +
    +
    + + #string + +COMMANDCENTER.CommandCenterName + +
    +
    + + + +
    +
    +
    +
    + + +COMMANDCENTER.CommandCenterPositionable + +
    +
    + + + +
    +
    +
    +
    + + +COMMANDCENTER:GetMissions() + +
    +
    + +

    Get the Missions governed by the HQ command center.

    + +

    Return value

    + +

    #list: +Tasking.Mission#MISSION>

    + +
    +
    +
    +
    + + +COMMANDCENTER:GetName() + +
    +
    + +

    Gets the name of the HQ command center.

    + +

    Return value

    + +

    #string:

    + + +
    +
    +
    +
    + + +COMMANDCENTER:GetPositionable() + +
    +
    + +

    Gets the POSITIONABLE of the HQ command center.

    + +

    Return value

    + +

    Wrapper.Positionable#POSITIONABLE:

    + + +
    +
    +
    +
    + + Wrapper.Group#GROUP + +COMMANDCENTER.HQ + +
    +
    + + + +
    +
    +
    +
    + + +COMMANDCENTER:HasGroup(Wrapper, MissionGroup) + +
    +
    + +

    Checks of the COMMANDCENTER has a GROUP.

    + +

    Parameters

    +
      +
    • + +

      Wrapper : +Group#GROUP

      + +
    • +
    • + +

      MissionGroup :

      + +
    • +
    +

    Return value

    + +

    #boolean:

    + + +
    +
    +
    +
    + + +COMMANDCENTER:MessageToCoalition(Message) + +
    +
    + +

    Send a CC message to the coalition of the CC.

    + +

    Parameter

    +
      +
    • + +

      Message :

      + +
    • +
    +
    +
    +
    +
    + + +COMMANDCENTER:MessageToGroup(Message, TaskGroup) + +
    +
    + +

    Send a CC message to a GROUP.

    + +

    Parameters

    +
      +
    • + +

      Message :

      + +
    • +
    • + +

      TaskGroup :

      + +
    • +
    +
    +
    +
    +
    + + #string + +COMMANDCENTER.Name + +
    +
    + + + +
    +
    +
    +
    + + +COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) + +
    +
    + +

    The constructor takes an IDENTIFIABLE as the HQ command center.

    + +

    Parameters

    + +

    Return value

    + +

    #COMMANDCENTER:

    + + +
    +
    +
    +
    + + +COMMANDCENTER:RemoveMission(Mission) + +
    +
    + +

    Removes a MISSION to be governed by the HQ command center.

    + + +

    The given Mission is not nilified.

    + +

    Parameter

    + +

    Return value

    + +

    Tasking.Mission#MISSION:

    + + +
    +
    +
    +
    + + +COMMANDCENTER:ReportDetails(ReportGroup, Task) + +
    +
    + +

    Report the status of a Task to a Group.

    + + +

    Report the details of a Mission, listing the Mission, and all the Task details.

    + +

    Parameters

    +
      +
    • + +

      ReportGroup :

      + +
    • +
    • + +

      Task :

      + +
    • +
    +
    +
    +
    +
    + + +COMMANDCENTER:ReportSummary(ReportGroup) + +
    +
    + +

    Report the status of all MISSIONs to a GROUP.

    + + +

    Each Mission is listed, with an indication how many Tasks are still to be completed.

    + +

    Parameter

    +
      +
    • + +

      ReportGroup :

      + +
    • +
    +
    +
    +
    +
    + + +COMMANDCENTER:SetMenu() + +
    +
    + +

    Sets the menu structure of the Missions governed by the HQ command center.

    + +
    +
    + +

    Type REPORT

    + +

    The REPORT class

    + +

    Field(s)

    +
    +
    + + +REPORT:Add(Text) + +
    +
    + +

    Add a new line to a REPORT.

    + +

    Parameter

    +
      +
    • + +

      #string Text :

      + +
    • +
    +

    Return value

    + +

    #REPORT:

    + + +
    +
    +
    +
    + + #string + +REPORT.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +REPORT:New(Title) + +
    +
    + +

    Create a new REPORT.

    + +

    Parameter

    +
      +
    • + +

      #string Title :

      + +
    • +
    +

    Return value

    + +

    #REPORT:

    + + +
    +
    +
    +
    + + +REPORT:Text() + +
    +
    + + + +
    +
    + +

    Type TASK

    + +

    Type list

    + +
    + + + + diff --git a/Moose Training/Documentation/Controllable.html b/Moose Training/Documentation/Controllable.html index 191cf6290..3d98f7051 100644 --- a/Moose Training/Documentation/Controllable.html +++ b/Moose Training/Documentation/Controllable.html @@ -17,7 +17,7 @@ index
    @@ -87,8 +89,8 @@ -

    1) Controllable#CONTROLLABLE class, extends Positionable#POSITIONABLE

    -

    The Controllable#CONTROLLABLE class is a wrapper class to handle the DCS Controllable objects:

    +

    1) Wrapper.Controllable#CONTROLLABLE class, extends Wrapper.Positionable#POSITIONABLE

    +

    The Wrapper.Controllable#CONTROLLABLE class is a wrapper class to handle the DCS Controllable objects:

    Return value

    -

    DCSTask#Task:

    +

    Dcs.DCSTasking.Task#Task:

    @@ -857,7 +817,7 @@ A speed can be given in km/h.

    Return value

    -

    DCSTask#Task:

    +

    Dcs.DCSTasking.Task#Task:

    Usage:

    @@ -898,7 +858,7 @@ SCHEDULER:New( nil,
    -

    Return the route of a controllable by using the Database#DATABASE class.

    +

    Return the route of a controllable by using the Core.Database#DATABASE class.

    Parameters

    @@ -980,7 +940,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1003,7 +963,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1072,13 +1032,13 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1111,7 +1071,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1184,7 +1144,7 @@ If the task is assigned to the controllable lead unit will be a FAC.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1221,7 +1181,7 @@ If the task is assigned to the controllable lead unit will be a FAC.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1273,7 +1233,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -1337,39 +1297,6 @@ If no detection method is given, the detection will use all the available method

    #table: DetectedTargets

    - - -
    -
    - - -CONTROLLABLE:GetMessage(Message, Duration) - -
    -
    - -

    Returns a message with the callsign embedded (if there is one).

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    -

    Return value

    - -

    Message#MESSAGE:

    - -
    @@ -1433,204 +1360,6 @@ The mission route defined by points.

    - -CONTROLLABLE:Message(Message, Duration) - -
    -
    - -

    Send a message to the players in the Group.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:MessageToAll(Message, Duration) - -
    -
    - -

    Send a message to all coalitions.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:MessageToBlue(Message, Duration) - -
    -
    - -

    Send a message to the blue coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:MessageToClient(Message, Duration, Client) - -
    -
    - -

    Send a message to a client.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      Client#CLIENT Client : -The client object receiving the message.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:MessageToGroup(Message, Duration, MessageGroup) - -
    -
    - -

    Send a message to a Group.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTypes#Duration Duration : -The duration of the message.

      - -
    • -
    • - -

      Group#GROUP MessageGroup : -The GROUP object receiving the message.

      - -
    • -
    -
    -
    -
    -
    - - -CONTROLLABLE:MessageToRed(Message, Duration) - -
    -
    - -

    Send a message to the red coalition.

    - - -

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    - -

    Parameters

    -
      -
    • - -

      #string Message : -The message text

      - -
    • -
    • - -

      DCSTYpes#Duration Duration : -The duration of the message.

      - -
    • -
    -
    -
    -
    -
    - CONTROLLABLE:New(ControllableName) @@ -1643,7 +1372,7 @@ The duration of the message.

    Return value

    -

    Controllable#CONTROLLABLE: +

    Wrapper.Controllable#CONTROLLABLE: self

    @@ -2028,7 +1757,7 @@ self

    -

    (AIR) Return the Controllable to an Airbase#AIRBASE +

    (AIR) Return the Controllable to an Wrapper.Airbase#AIRBASE A speed can be given in km/h.

    @@ -2038,8 +1767,8 @@ A speed can be given in km/h.

    Return value

    -

    Controllable#CONTROLLABLE: +

    Wrapper.Controllable#CONTROLLABLE: self

    @@ -2128,7 +1857,7 @@ self

    • -

      Controllable#CONTROLLABLE AttackGroup : +

      Wrapper.Controllable#CONTROLLABLE AttackGroup : The Controllable to be attacked.

    • @@ -2140,7 +1869,7 @@ The Controllable to be attacked.

    • -

      DCSTypes#AI.Task.WeaponExpend WeaponExpend : +

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    • @@ -2152,13 +1881,13 @@ The Controllable to be attacked.

    • -

      DCSTypes#Azimuth Direction : +

      Dcs.DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    • -

      DCSTypes#Distance Altitude : +

      Dcs.DCSTypes#Distance Altitude : (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

    • @@ -2171,7 +1900,7 @@ The Controllable to be attacked.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2191,7 +1920,7 @@ The DCS task structure.

    • -

      DCSTypes#Vec2 Vec2 : +

      Dcs.DCSTypes#Vec2 Vec2 : 2D-coordinates of the point the map object is closest to. The distance between the point and the map object must not be greater than 2000 meters. Object id is not used here because Mission Editor doesn't support map object identificators.

    • @@ -2203,7 +1932,7 @@ The DCS task structure.

    • -

      DCSTypes#AI.Task.WeaponExpend WeaponExpend : +

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    • @@ -2215,7 +1944,7 @@ The DCS task structure.

    • -

      DCSTypes#Azimuth Direction : +

      Dcs.DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    • @@ -2228,7 +1957,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2248,7 +1977,7 @@ The DCS task structure.

    • -

      Unit#UNIT AttackUnit : +

      Wrapper.Unit#UNIT AttackUnit : The unit.

    • @@ -2260,7 +1989,7 @@ The unit.

    • -

      DCSTypes#AI.Task.WeaponExpend WeaponExpend : +

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    • @@ -2272,7 +2001,7 @@ The unit.

    • -

      DCSTypes#Azimuth Direction : +

      Dcs.DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    • @@ -2291,7 +2020,7 @@ The unit.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2311,7 +2040,7 @@ The DCS task structure.

    • -

      DCSTypes#Vec2 Vec2 : +

      Dcs.DCSTypes#Vec2 Vec2 : 2D-coordinates of the point to deliver weapon at.

    • @@ -2323,7 +2052,7 @@ The DCS task structure.

    • -

      DCSTypes#AI.Task.WeaponExpend WeaponExpend : +

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    • @@ -2335,7 +2064,7 @@ The DCS task structure.

    • -

      DCSTypes#Azimuth Direction : +

      Dcs.DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    • @@ -2348,7 +2077,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2368,7 +2097,7 @@ The DCS task structure.

    • -

      Airbase#AIRBASE Airbase : +

      Wrapper.Airbase#AIRBASE Airbase : Airbase to attack.

    • @@ -2380,7 +2109,7 @@ Airbase to attack.

    • -

      DCSTypes#AI.Task.WeaponExpend WeaponExpend : +

      Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : (optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    • @@ -2392,7 +2121,7 @@ Airbase to attack.

    • -

      DCSTypes#Azimuth Direction : +

      Dcs.DCSTypes#Azimuth Direction : (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    • @@ -2405,7 +2134,7 @@ Airbase to attack.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2425,14 +2154,14 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task:

    +

    Dcs.DCSTasking.Task#Task:

    @@ -2452,7 +2181,7 @@ Array of DCSTask#Task

    @@ -2499,7 +2228,7 @@ return DCSTask#Task

    Return value

    -

    DCSTask#Task:

    +

    Dcs.DCSTasking.Task#Task:

    @@ -2530,7 +2259,7 @@ return DCSTask#Task

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2563,7 +2292,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure

    @@ -2606,13 +2335,13 @@ The unit / controllable will also protect that controllable from threats of spec

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2826,7 +2555,7 @@ The DCS task structure.

    Return value

    -

    DCSTask#Task: +

    Dcs.DCSTasking.Task#Task: The DCS task structure.

    @@ -2876,7 +2605,7 @@ self

    @@ -380,7 +382,7 @@ Airbase type name.

    Return value

    -

    Unit#Unit:

    +

    Wrapper.Unit#Unit:

    diff --git a/Moose Training/Documentation/DCSCoalitionObject.html b/Moose Training/Documentation/DCSCoalitionObject.html index 144926d49..1b5de15ff 100644 --- a/Moose Training/Documentation/DCSCoalitionObject.html +++ b/Moose Training/Documentation/DCSCoalitionObject.html @@ -17,7 +17,7 @@ index
    @@ -194,7 +196,7 @@

    Return value

    -

    DCSTypes#coalition.side:

    +

    Dcs.DCSTypes#coalition.side:

    diff --git a/Moose Training/Documentation/DCSCommand.html b/Moose Training/Documentation/DCSCommand.html index 295c9acaa..4cbd74065 100644 --- a/Moose Training/Documentation/DCSCommand.html +++ b/Moose Training/Documentation/DCSCommand.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCSController.html b/Moose Training/Documentation/DCSController.html index 9eb61abd0..a5eeb2d71 100644 --- a/Moose Training/Documentation/DCSController.html +++ b/Moose Training/Documentation/DCSController.html @@ -17,7 +17,7 @@ index
    @@ -344,7 +346,7 @@ Controller.Detection detection1, Controller.Detection detection2, ... Controller
    @@ -330,7 +332,7 @@

    Return value

    -

    DCSCoalitionObject#coalition.side:

    +

    Dcs.DCSCoalitionWrapper.Object#coalition.side:

    @@ -458,7 +460,7 @@

    Return value

    -

    DCSUnit#Unit:

    +

    Dcs.DCSWrapper.Unit#Unit:

    @@ -480,7 +482,7 @@

    Return value

    #list: -DCSUnit#Unit> array of Units

    +Dcs.DCSWrapper.Unit#Unit> array of Units

    diff --git a/Moose Training/Documentation/DCSObject.html b/Moose Training/Documentation/DCSObject.html index 36223acce..72238f7e0 100644 --- a/Moose Training/Documentation/DCSObject.html +++ b/Moose Training/Documentation/DCSObject.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCSTask.html b/Moose Training/Documentation/DCSTask.html index ebdfa69ff..6180e672b 100644 --- a/Moose Training/Documentation/DCSTask.html +++ b/Moose Training/Documentation/DCSTask.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCSTypes.html b/Moose Training/Documentation/DCSTypes.html index 13fa58122..99b096eb3 100644 --- a/Moose Training/Documentation/DCSTypes.html +++ b/Moose Training/Documentation/DCSTypes.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCSUnit.html b/Moose Training/Documentation/DCSUnit.html index dd27fefef..f6fb63392 100644 --- a/Moose Training/Documentation/DCSUnit.html +++ b/Moose Training/Documentation/DCSUnit.html @@ -17,7 +17,7 @@ index
    @@ -202,24 +204,6 @@ Unit.SensorType - - - - Unit.detectionDistanceAfterburner - -

    ..., engines are in afterburner mode

    - - - - Unit.detectionDistanceIdle - -

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    - - - - Unit.detectionDistanceMaximal - -

    ..., engines are in maximal mode

    @@ -655,6 +639,28 @@ First value indicates if at least one of the unit's radar(s) is on.

    Unit.SensorType.RWR + + + + +

    Type Wrapper.Unit

    + + + + + + + + + + + +
    Wrapper.Unit.detectionDistanceAfterburner +

    ..., engines are in afterburner mode

    +
    Wrapper.Unit.detectionDistanceIdle +

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    +
    Wrapper.Unit.detectionDistanceMaximal +

    ..., engines are in maximal mode

    @@ -687,10 +693,7 @@ First value indicates if at least one of the unit's radar(s) is on.

    Type TypeName

    Type Unit

    - -

    An IRST.

    - -

    Field(s)

    +

    Field(s)

    @@ -940,48 +943,6 @@ First value indicates if at least one of the unit's radar(s) is on.

    - -
    -
    -
    - - #Distance - -Unit.detectionDistanceAfterburner - -
    -
    - -

    ..., engines are in afterburner mode

    - -
    -
    -
    -
    - - #Distance - -Unit.detectionDistanceIdle - -
    -
    - -

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    - -
    -
    -
    -
    - - #Distance - -Unit.detectionDistanceMaximal - -
    -
    - -

    ..., engines are in maximal mode

    -
    @@ -1122,7 +1083,7 @@ First value indicates if at least one of the unit's radar(s) is on.

    Return value

    -

    DCSGroup#Group:

    +

    Dcs.DCSWrapper.Group#Group:

    @@ -1240,7 +1201,7 @@ First value indicates if at least one of the unit's radar(s) is on.

    Return value

    -

    #boolean, Object#Object:

    +

    #boolean, Wrapper.Object#Object:

    @@ -2054,6 +2015,54 @@ If sensor type is not specified the function returns true if the unit has at lea

    Type Weapon.Desc

    +

    Type Wrapper.Unit

    + +

    An IRST.

    + +

    Field(s)

    +
    +
    + + #Distance + +Wrapper.Unit.detectionDistanceAfterburner + +
    +
    + +

    ..., engines are in afterburner mode

    + +
    +
    +
    +
    + + #Distance + +Wrapper.Unit.detectionDistanceIdle + +
    +
    + +

    detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

    + +
    +
    +
    +
    + + #Distance + +Wrapper.Unit.detectionDistanceMaximal + +
    +
    + +

    ..., engines are in maximal mode

    + +
    +
    +

    Type list

    diff --git a/Moose Training/Documentation/DCSWorld.html b/Moose Training/Documentation/DCSWorld.html index 82e4b474a..b5410c686 100644 --- a/Moose Training/Documentation/DCSWorld.html +++ b/Moose Training/Documentation/DCSWorld.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCScountry.html b/Moose Training/Documentation/DCScountry.html index d593b5183..030327afe 100644 --- a/Moose Training/Documentation/DCScountry.html +++ b/Moose Training/Documentation/DCScountry.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCStimer.html b/Moose Training/Documentation/DCStimer.html index 9fe22609a..2a22ff28a 100644 --- a/Moose Training/Documentation/DCStimer.html +++ b/Moose Training/Documentation/DCStimer.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/DCStrigger.html b/Moose Training/Documentation/DCStrigger.html index 1fcec8753..9ffca8c0d 100644 --- a/Moose Training/Documentation/DCStrigger.html +++ b/Moose Training/Documentation/DCStrigger.html @@ -17,7 +17,7 @@ index
    diff --git a/Moose Training/Documentation/Database.html b/Moose Training/Documentation/Database.html index 1180bccad..68a700372 100644 --- a/Moose Training/Documentation/Database.html +++ b/Moose Training/Documentation/Database.html @@ -17,7 +17,7 @@ index
    @@ -89,7 +91,7 @@
    -

    1) Database#DATABASE class, extends Base#BASE

    +

    1) Core.Database#DATABASE class, extends Core.Base#BASE

    Mission designers can use the DATABASE class to refer to:

    Return value

    -

    Airbase#AIRBASE: +

    Wrapper.Airbase#AIRBASE: The found AIRBASE.

    @@ -786,7 +788,7 @@ The found AIRBASE.

    Return value

    -

    Client#CLIENT: +

    Wrapper.Client#CLIENT: The found CLIENT.

    @@ -812,7 +814,7 @@ The found CLIENT.

    Return value

    -

    Group#GROUP: +

    Wrapper.Group#GROUP: The found GROUP.

    @@ -838,7 +840,7 @@ The found GROUP.

    Return value

    -

    Static#STATIC: +

    Wrapper.Static#STATIC: The found STATIC.

    @@ -864,7 +866,7 @@ The found STATIC.

    Return value

    -

    Unit#UNIT: +

    Wrapper.Unit#UNIT: The found Unit.

    @@ -1457,7 +1459,7 @@ self

    @@ -1478,7 +1480,7 @@ self

    @@ -1499,7 +1501,7 @@ self

    @@ -1520,7 +1522,7 @@ self

    diff --git a/Moose Training/Documentation/Detection.html b/Moose Training/Documentation/Detection.html index ea14ce2b2..43c5617c1 100644 --- a/Moose Training/Documentation/Detection.html +++ b/Moose Training/Documentation/Detection.html @@ -17,7 +17,7 @@ index
    @@ -88,12 +90,12 @@

    -

    1) Detection#DETECTION_BASE class, extends Base#BASE

    -

    The Detection#DETECTION_BASE class defines the core functions to administer detected objects. - The Detection#DETECTION_BASE class will detect objects within the battle zone for a list of Groups detecting targets following (a) detection method(s).

    +

    1) Functional.Detection#DETECTION_BASE class, extends Core.Base#BASE

    +

    The Functional.Detection#DETECTION_BASE class defines the core functions to administer detected objects. + The Functional.Detection#DETECTION_BASE class will detect objects within the battle zone for a list of Groups detecting targets following (a) detection method(s).

    1.1) DETECTION_BASE constructor

    -

    Construct a new DETECTION_BASE instance using the Detection#DETECTION_BASE.New() method.

    +

    Construct a new DETECTION_BASE instance using the Functional.Detection#DETECTION_BASE.New() method.

    1.2) DETECTION_BASE initialization

    By default, detection will return detected objects with all the detection sensors available. @@ -104,42 +106,42 @@

    Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:

    1.3) Obtain objects detected by DETECTION_BASE

    -

    DETECTION_BASE builds Sets of objects detected. These Set#SET_BASEs can be retrieved using the method Detection#DETECTION_BASE.GetDetectedSets(). - The method will return a list (table) of Set#SET_BASE objects.

    +

    DETECTION_BASE builds Sets of objects detected. These Core.Set#SET_BASEs can be retrieved using the method Functional.Detection#DETECTION_BASE.GetDetectedSets(). + The method will return a list (table) of Core.Set#SET_BASE objects.


    -

    2) Detection#DETECTION_AREAS class, extends Detection#DETECTION_BASE

    -

    The Detection#DETECTION_AREAS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), - and will build a list (table) of Set#SET_UNITs containing the Unit#UNITs detected. +

    2) Functional.Detection#DETECTION_AREAS class, extends Functional.Detection#DETECTION_BASE

    +

    The Functional.Detection#DETECTION_AREAS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), + and will build a list (table) of Core.Set#SET_UNITs containing the Wrapper.Unit#UNITs detected. The class is group the detected units within zones given a DetectedZoneRange parameter. A set with multiple detected zones will be created as there are groups of units detected.

    2.1) Retrieve the Detected Unit sets and Detected Zones

    -

    The DetectedUnitSets methods are implemented in Detection#DECTECTION_BASE and the DetectedZones methods is implemented in Detection#DETECTION_AREAS.

    +

    The DetectedUnitSets methods are implemented in Functional.Detection#DECTECTION_BASE and the DetectedZones methods is implemented in Functional.Detection#DETECTION_AREAS.

    -

    Retrieve the DetectedUnitSets with the method Detection#DETECTION_BASE.GetDetectedSets(). A table will be return of Set#SET_UNITs. - To understand the amount of sets created, use the method Detection#DETECTION_BASE.GetDetectedSetCount(). - If you want to obtain a specific set from the DetectedSets, use the method Detection#DETECTION_BASE.GetDetectedSet() with a given index.

    +

    Retrieve the DetectedUnitSets with the method Functional.Detection#DETECTION_BASE.GetDetectedSets(). A table will be return of Core.Set#SET_UNITs. + To understand the amount of sets created, use the method Functional.Detection#DETECTION_BASE.GetDetectedSetCount(). + If you want to obtain a specific set from the DetectedSets, use the method Functional.Detection#DETECTION_BASE.GetDetectedSet() with a given index.

    -

    Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Detection#DETECTION_BASE.GetDetectionZones(). - To understand the amount of zones created, use the method Detection#DETECTION_BASE.GetDetectionZoneCount(). - If you want to obtain a specific zone from the DetectedZones, use the method Detection#DETECTION_BASE.GetDetectionZone() with a given index.

    +

    Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Functional.Detection#DETECTION_BASE.GetDetectionZones(). + To understand the amount of zones created, use the method Functional.Detection#DETECTION_BASE.GetDetectionZoneCount(). + If you want to obtain a specific zone from the DetectedZones, use the method Functional.Detection#DETECTION_BASE.GetDetectionZone() with a given index.

    1.4) Flare or Smoke detected units

    -

    Use the methods Detection#DETECTION_AREAS.FlareDetectedUnits() or Detection#DETECTION_AREAS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

    +

    Use the methods Functional.Detection#DETECTION_AREAS.FlareDetectedUnits() or Functional.Detection#DETECTION_AREAS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

    1.5) Flare or Smoke detected zones

    -

    Use the methods Detection#DETECTION_AREAS.FlareDetectedZones() or Detection#DETECTION_AREAS.SmokeDetectedZones() to flare or smoke the detected zones when a new detection has taken place.

    +

    Use the methods Functional.Detection#DETECTION_AREAS.FlareDetectedZones() or Functional.Detection#DETECTION_AREAS.SmokeDetectedZones() to flare or smoke the detected zones when a new detection has taken place.


    @@ -260,13 +262,13 @@ DETECTION_AREAS:GetDetectedSet(Index) -

    Get the Set#SET_UNIT of a detecttion area using a given numeric index.

    +

    Get the Core.Set#SET_UNIT of a detecttion area using a given numeric index.

    DETECTION_AREAS:GetDetectedZone(Index) -

    Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

    +

    Get the Core.Zone#ZONE_UNIT of a detection area using a given numeric index.

    @@ -502,7 +504,7 @@ DETECTION_BASE:GetDetectedSets() -

    Get the detected Set#SET_BASEs.

    +

    Get the detected Core.Set#SET_BASEs.

    @@ -598,7 +600,7 @@ DETECTION_BASE:_DetectionScheduler(SchedulerName) -

    Form Sets of detected Unit#UNITs in an array of Set#SET_BASEs.

    +

    Form Sets of detected Wrapper.Unit#UNITs in an array of Core.Set#SET_BASEs.

    @@ -786,13 +788,13 @@ self

    Return value

    -

    Unit#UNIT: +

    Wrapper.Unit#UNIT: The nearest FAC unit

    @@ -1136,26 +1138,26 @@ The nearest FAC unit

    Return value

    -

    Detection#DETECTION_AREAS: +

    Functional.Detection#DETECTION_AREAS: self

    @@ -1202,7 +1204,7 @@ The Index of the detection are to be removed.

    Return value

    -

    Set#SET_BASE:

    +

    Core.Set#SET_BASE:

    @@ -1710,7 +1712,7 @@ Count

    -

    Get the detected Set#SET_BASEs.

    +

    Get the detected Core.Set#SET_BASEs.

    Return value

    @@ -1732,7 +1734,7 @@ DetectedSets

    Return value

    -

    Group#GROUP:

    +

    Wrapper.Group#GROUP:

    @@ -1955,13 +1957,13 @@ true if already identified.

    @@ -168,7 +170,7 @@ Note that this is really fantastic, as you now have the dynamic of taking contro

    Create a new SPAWN object with the ESCORT.New method:

    ESCORT initialization methods.

    @@ -774,7 +776,7 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the @@ -806,7 +808,7 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the
    - Client#CLIENT + Wrapper.Client#CLIENT ESCORT.EscortClient @@ -820,7 +822,7 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the
    - Group#GROUP + Wrapper.Group#GROUP ESCORT.EscortGroup @@ -1196,7 +1198,7 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the
    - Menu#MENU_CLIENT + Core.Menu#MENU_CLIENT ESCORT.EscortMenuResumeMission @@ -1382,7 +1384,7 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the
    - Scheduler#SCHEDULER + Core.Scheduler#SCHEDULER ESCORT.FollowScheduler @@ -1408,17 +1410,17 @@ EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the @@ -1538,7 +1540,7 @@ Optional parameter that shows the menu option text. If no text is given, the def

    Module Event

    -

    The EVENT class models an efficient event handling process between other classes and its units, weapons.

    +

    This module contains the EVENT class.

    + + + +
    + +

    Takes care of EVENT dispatching between DCS events and event handling functions defined in MOOSE classes.

    + +
    + +

    The above menus classes are derived from 2 main abstract classes defined within the MOOSE framework (so don't use these):

    + +
    + +

    Contributions: -

    +

    Authors: FlightControl : Design & Programming

    +

    Global(s)

    @@ -133,243 +151,249 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + @@ -608,12 +632,12 @@ @@ -641,7 +665,7 @@
    -EVENT:OnBirth(EventFunction, EventSelf) +EVENT:OnBirth(EventFunction, EventClass)
    @@ -658,7 +682,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf :

    +

    Base#BASE EventClass :

  • @@ -673,7 +697,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate) +EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)
    @@ -684,7 +708,7 @@ The function to be called when the event occurs for the unit.

    @@ -754,7 +778,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnBirthRemove(EventSelf) +EVENT:OnBirthRemove(EventClass)
    @@ -765,7 +789,7 @@ The function to be called when the event occurs for the unit.

    @@ -780,7 +804,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnCrash(EventFunction, EventSelf) +EVENT:OnCrash(EventFunction, EventClass)
    @@ -797,7 +821,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf :

    +

    Base#BASE EventClass :

  • @@ -812,7 +836,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate) +EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)
    @@ -823,7 +847,7 @@ The function to be called when the event occurs for the unit.

    @@ -951,7 +975,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate) +EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)
    @@ -962,7 +986,7 @@ The function to be called when the event occurs for the unit.

    @@ -1476,7 +1500,7 @@ The self instance of the class for which the event is.

    -EVENT:OnLandForUnit(EventDCSUnitName, EventFunction, EventSelf) +EVENT:OnLandForUnit(EventDCSUnitName, EventFunction, EventClass)
    @@ -1498,7 +1522,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf : +

    Base#BASE EventClass : The self instance of the class for which the event is.

  • @@ -1514,7 +1538,7 @@ The self instance of the class for which the event is.

    -EVENT:OnLandRemove(EventSelf) +EVENT:OnLandRemove(EventClass)
    @@ -1525,7 +1549,7 @@ The self instance of the class for which the event is.

    @@ -1540,7 +1564,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPilotDead(EventFunction, EventSelf) +EVENT:OnPilotDead(EventFunction, EventClass)
    @@ -1557,7 +1581,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf :

    +

    Base#BASE EventClass :

  • @@ -1572,7 +1596,7 @@ The function to be called when the event occurs for the unit.

    -EVENT:OnPilotDeadForUnit(EventDCSUnitName, EventFunction, EventSelf) +EVENT:OnPilotDeadForUnit(EventDCSUnitName, EventFunction, EventClass)
    @@ -1594,7 +1618,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf : +

    Base#BASE EventClass : The self instance of the class for which the event is.

  • @@ -1610,7 +1634,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPilotDeadRemove(EventSelf) +EVENT:OnPilotDeadRemove(EventClass)
    @@ -1621,7 +1645,7 @@ The self instance of the class for which the event is.

    @@ -1636,7 +1660,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPlayerEnterRemove(EventSelf) +EVENT:OnPlayerEnterRemove(EventClass)
    @@ -1647,7 +1671,7 @@ The self instance of the class for which the event is.

    @@ -1662,7 +1686,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPlayerEnterUnit(EventFunction, EventSelf) +EVENT:OnPlayerEnterUnit(EventFunction, EventClass)
    @@ -1679,7 +1703,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf : +

    Base#BASE EventClass : The self instance of the class for which the event is.

  • @@ -1695,7 +1719,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPlayerLeaveRemove(EventSelf) +EVENT:OnPlayerLeaveRemove(EventClass)
    @@ -1706,7 +1730,7 @@ The self instance of the class for which the event is.

    @@ -1721,7 +1745,7 @@ The self instance of the class for which the event is.

    -EVENT:OnPlayerLeaveUnit(EventFunction, EventSelf) +EVENT:OnPlayerLeaveUnit(EventFunction, EventClass)
    @@ -1737,7 +1761,7 @@ The self instance of the class for which the event is.

  • -

    EventSelf :

    +

    EventClass :

  • @@ -1747,7 +1771,7 @@ The self instance of the class for which the event is.

    -EVENT:OnShot(EventFunction, EventSelf) +EVENT:OnShot(EventFunction, EventClass)
    @@ -1763,7 +1787,7 @@ The self instance of the class for which the event is.

  • -

    EventSelf :

    +

    EventClass :

  • @@ -1773,7 +1797,7 @@ The self instance of the class for which the event is.

    -EVENT:OnShotForUnit(EventDCSUnitName, EventFunction, EventSelf) +EVENT:OnShotForUnit(EventDCSUnitName, EventFunction, EventClass)
    @@ -1795,7 +1819,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf : +

    Base#BASE EventClass : The self instance of the class for which the event is.

  • @@ -1811,7 +1835,7 @@ The self instance of the class for which the event is.

    -EVENT:OnShotRemove(EventSelf) +EVENT:OnShotRemove(EventClass)
    @@ -1822,7 +1846,7 @@ The self instance of the class for which the event is.

    @@ -1837,7 +1861,7 @@ The self instance of the class for which the event is.

    -EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventSelf) +EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass)
    @@ -1858,7 +1882,7 @@ The self instance of the class for which the event is.

  • -

    EventSelf :

    +

    EventClass :

  • @@ -1868,7 +1892,7 @@ The self instance of the class for which the event is.

    -EVENT:OnTakeOffForUnit(EventDCSUnitName, EventFunction, EventSelf) +EVENT:OnTakeOffForUnit(EventDCSUnitName, EventFunction, EventClass)
    @@ -1890,7 +1914,7 @@ The function to be called when the event occurs for the unit.

  • -

    Base#BASE EventSelf : +

    Base#BASE EventClass : The self instance of the class for which the event is.

  • @@ -1906,7 +1930,7 @@ The self instance of the class for which the event is.

    -EVENT:OnTakeOffRemove(EventSelf) +EVENT:OnTakeOffRemove(EventClass)
    @@ -1917,7 +1941,7 @@ The self instance of the class for which the event is.

    @@ -1932,7 +1956,7 @@ The self instance of the class for which the event is.

    -EVENT:Remove(EventSelf, EventID) +EVENT:Remove(EventClass, EventID)
    @@ -1943,13 +1967,13 @@ The self instance of the class for which the event is.

    @@ -1963,6 +1987,27 @@ The self instance of the class for which the event is.

    + +EVENT:RemoveAll(EventObject) + +
    +
    + +

    Clears all event subscriptions for a Core.Base#BASE derived object.

    + +

    Parameter

    + +
    +
    +
    +
    + EVENT:onEvent(Event) @@ -2062,7 +2107,7 @@ The self instance of the class for which the event is.

    - Unit#UNIT + Wrapper.Unit#UNIT EVENTDATA.IniUnit @@ -2142,7 +2187,7 @@ The self instance of the class for which the event is.

    - Unit#UNIT + Wrapper.Unit#UNIT EVENTDATA.TgtUnit diff --git a/Moose Training/Documentation/Fsm.html b/Moose Training/Documentation/Fsm.html new file mode 100644 index 000000000..42fe68623 --- /dev/null +++ b/Moose Training/Documentation/Fsm.html @@ -0,0 +1,2036 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module Fsm

    + +

    This module contains the FSM class.

    + + +

    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

    + +

    I've taken the development and enhanced it to make the state machine hierarchical... +It is a fantastic development, this module.

    + +
    + +

    1) Workflow#FSM class, extends Core.Base#BASE

    + +

    1.1) Add or remove objects from the FSM

    + +

    Global(s)

    +
    EVENT:OnBirth(EventFunction, EventSelf)EVENT:OnBirth(EventFunction, EventClass)

    Set a new listener for an SEVENTBIRTH event, and registers the unit born.

    EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate)EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)

    Create an OnBirth event handler for a group

    EVENT:OnBirthForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnBirthForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTBIRTH event.

    EVENT:OnBirthRemove(EventSelf)EVENT:OnBirthRemove(EventClass)

    Stop listening to SEVENTBIRTH event.

    EVENT:OnCrash(EventFunction, EventSelf)EVENT:OnCrash(EventFunction, EventClass)

    Set a new listener for an SEVENTCRASH event.

    EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate)EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)

    Create an OnCrash event handler for a group

    EVENT:OnCrashForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnCrashForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTCRASH event.

    EVENT:OnCrashRemove(EventSelf)EVENT:OnCrashRemove(EventClass)

    Stop listening to SEVENTCRASH event.

    EVENT:OnDead(EventFunction, EventSelf)EVENT:OnDead(EventFunction, EventClass)

    Set a new listener for an SEVENTDEAD event.

    EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventSelf, EventTemplate)EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate)

    Create an OnDead event handler for a group

    EVENT:OnDeadForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnDeadForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTDEAD event.

    EVENT:OnDeadRemove(EventSelf)EVENT:OnDeadRemove(EventClass)

    Stop listening to SEVENTDEAD event.

    EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventSelf)EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass)

    Create an OnDead event handler for a group

    EVENT:OnEngineShutDownForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnEngineShutDownForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTENGINE_SHUTDOWN event.

    EVENT:OnEngineShutDownRemove(EventSelf)EVENT:OnEngineShutDownRemove(EventClass)

    Stop listening to SEVENTENGINE_SHUTDOWN event.

    EVENT:OnEngineStartUpForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnEngineStartUpForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTENGINE_STARTUP event.

    EVENT:OnEngineStartUpRemove(EventSelf)EVENT:OnEngineStartUpRemove(EventClass)

    Stop listening to SEVENTENGINE_STARTUP event.

    EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventSelf, OnEventFunction)EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction)

    Create an OnDead event handler for a group

    EVENT:OnEventForUnit(EventDCSUnitName, EventFunction, EventSelf, EventID)EVENT:OnEventForUnit(EventDCSUnitName, EventFunction, EventClass, EventID)

    Set a new listener for an SEVENTX event

    EVENT:OnEventGeneric(EventFunction, EventSelf, EventID)EVENT:OnEventGeneric(EventFunction, EventClass, EventID)

    Set a new listener for an SEVENTX event independent from a unit or a weapon.

    EVENT:OnHit(EventFunction, EventSelf)EVENT:OnHit(EventFunction, EventClass)

    Set a new listener for an SEVENTHIT event.

    EVENT:OnHitForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnHitForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTHIT event.

    EVENT:OnHitRemove(EventSelf)EVENT:OnHitRemove(EventClass)

    Stop listening to SEVENTHIT event.

    EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventSelf)EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass)
    EVENT:OnLandForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnLandForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTLAND event.

    EVENT:OnLandRemove(EventSelf)EVENT:OnLandRemove(EventClass)

    Stop listening to SEVENTLAND event.

    EVENT:OnPilotDead(EventFunction, EventSelf)EVENT:OnPilotDead(EventFunction, EventClass)

    Set a new listener for an SEVENTPILOT_DEAD event.

    EVENT:OnPilotDeadForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnPilotDeadForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTPILOT_DEAD event.

    EVENT:OnPilotDeadRemove(EventSelf)EVENT:OnPilotDeadRemove(EventClass)

    Stop listening to SEVENTPILOT_DEAD event.

    EVENT:OnPlayerEnterRemove(EventSelf)EVENT:OnPlayerEnterRemove(EventClass)

    Stop listening to SEVENTPLAYERENTERUNIT event.

    EVENT:OnPlayerEnterUnit(EventFunction, EventSelf)EVENT:OnPlayerEnterUnit(EventFunction, EventClass)

    Set a new listener for an SEVENTPLAYERENTERUNIT event.

    EVENT:OnPlayerLeaveRemove(EventSelf)EVENT:OnPlayerLeaveRemove(EventClass)

    Stop listening to SEVENTPLAYERLEAVEUNIT event.

    EVENT:OnPlayerLeaveUnit(EventFunction, EventSelf)EVENT:OnPlayerLeaveUnit(EventFunction, EventClass)
    EVENT:OnShot(EventFunction, EventSelf)EVENT:OnShot(EventFunction, EventClass)
    EVENT:OnShotForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnShotForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTSHOT event for a unit.

    EVENT:OnShotRemove(EventSelf)EVENT:OnShotRemove(EventClass)

    Stop listening to SEVENTSHOT event.

    EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventSelf)EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass)
    EVENT:OnTakeOffForUnit(EventDCSUnitName, EventFunction, EventSelf)EVENT:OnTakeOffForUnit(EventDCSUnitName, EventFunction, EventClass)

    Set a new listener for an SEVENTTAKEOFF event.

    EVENT:OnTakeOffRemove(EventSelf)EVENT:OnTakeOffRemove(EventClass)

    Stop listening to SEVENTTAKEOFF event.

    EVENT:Remove(EventSelf, EventID)EVENT:Remove(EventClass, EventID)

    Removes an Events entry

    +
    EVENT:RemoveAll(EventObject) +

    Clears all event subscriptions for a Core.Base#BASE derived object.

    + + + + + + + + + + + + + + + + + + + + +
    FSM + +
    FSM_CONTROLLABLE + +
    FSM_PROCESS + +
    FSM_SET + +
    FSM_TASK + +
    +

    Type FSM

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FSM:AddEndState(State) + +
    FSM:AddProcess(From, Event, Process, ReturnEvents) +

    Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

    +
    FSM:AddScore(State, ScoreText, Score) +

    Adds a score for the FSM to be achieved.

    +
    FSM:AddScoreProcess(From, Event, State, ScoreText, Score) +

    Adds a score for the FSM_PROCESS to be achieved.

    +
    FSM:AddTransition(From, Event, To) + +
    FSM.ClassName + +
    FSM:GetEndStates() + +
    FSM:GetProcess(From, Event) + +
    FSM:GetProcesses() + +
    FSM:GetScores() + +
    FSM:GetStartState() + +
    FSM:GetState() + +
    FSM:GetSubs() + +
    FSM:GetTransitions() + +
    FSM:Is(State) + +
    FSM:LoadCallBacks(CallBackTable) + +
    FSM:New(FsmT) +

    Creates a new FSM object.

    +
    FSM:SetStartState(State) + +
    FSM:_add_to_map(Map, Event) + +
    FSM:_call_handler(handler, params) + +
    FSM:_create_transition(EventName) + +
    FSM:_delayed_transition(EventName) + +
    FSM:_eventmap(Events, EventStructure) + +
    FSM:_gosub(ParentFrom, ParentEvent) + +
    FSM:_handler(EventName, ...) + +
    FSM:_isendstate(Current) + +
    FSM:_submap(subs, sub, name) + +
    FSM:can(e) + +
    FSM:cannot(e) + +
    FSM:is(state) + +
    + +

    Type FSM_CONTROLLABLE

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FSM_CONTROLLABLE.ClassName + +
    FSM_CONTROLLABLE.Controllable + +
    FSM_CONTROLLABLE:GetControllable() +

    Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    +
    FSM_CONTROLLABLE:New(FSMT, Controllable) +

    Creates a new FSM_CONTROLLABLE object.

    +
    FSM_CONTROLLABLE:SetControllable(FSMControllable) +

    Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    +
    FSM_CONTROLLABLE:_call_handler(handler, params) + +
    + +

    Type FSM_PROCESS

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FSM_PROCESS:AddScore(State, ScoreText, Score) +

    Adds a score for the FSM_PROCESS to be achieved.

    +
    FSM_PROCESS:Assign(Task, ProcessUnit) +

    Assign the process to a Unit and activate the process.

    +
    FSM_PROCESS.ClassName + +
    FSM_PROCESS:Copy(Controllable, Task) +

    Creates a new FSMPROCESS object based on this FSMPROCESS.

    +
    FSM_PROCESS:GetCommandCenter() +

    Gets the mission of the process.

    +
    FSM_PROCESS:GetMission() +

    Gets the mission of the process.

    +
    FSM_PROCESS:GetTask() +

    Gets the task of the process.

    +
    FSM_PROCESS:Init(FsmProcess) + +
    FSM_PROCESS:Message(Message) +

    Send a message of the Task to the Group of the Unit.

    +
    FSM_PROCESS:New(Controllable, Task) +

    Creates a new FSM_PROCESS object.

    +
    FSM_PROCESS:SetTask(Task) +

    Sets the task of the process.

    +
    FSM_PROCESS.Task + +
    FSM_PROCESS:onenterAssigned(ProcessUnit) + +
    FSM_PROCESS:onenterFailed(ProcessUnit) + +
    FSM_PROCESS:onenterSuccess(ProcessUnit) + +
    FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Dummy) +

    StateMachine callback function for a FSM_PROCESS

    +
    + +

    Type FSM_SET

    + + + + + + + + + + + + + + + + + + + + + +
    FSM_SET.ClassName + +
    FSM_SET:Get() +

    Gets the SETBASE object that the FSMSET governs.

    +
    FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) +

    Creates a new FSM_SET object.

    +
    FSM_SET.Set + +
    FSM_SET:_call_handler(handler, params) + +
    + +

    Type FSM_TASK

    + + + + + + + + + + + + + + + + + +
    FSM_TASK.ClassName + +
    FSM_TASK:New(FSMT, Task, TaskUnit) +

    Creates a new FSM_TASK object.

    +
    FSM_TASK.Task + +
    FSM_TASK:_call_handler(handler, params) + +
    + +

    Global(s)

    +
    +
    + + #FSM + +FSM + +
    +
    + + + +
    +
    +
    +
    + + #FSM_CONTROLLABLE + +FSM_CONTROLLABLE + +
    +
    + + + +
    +
    +
    +
    + + #FSM_PROCESS + +FSM_PROCESS + +
    +
    + + + +
    +
    +
    +
    + + #FSM_SET + +FSM_SET + +
    +
    + + + +
    +
    +
    +
    + + #FSM_TASK + +FSM_TASK + +
    +
    + + + +
    +
    +

    Type Fsm

    + +

    Type FSM

    + +

    FSM class

    + +

    Field(s)

    +
    +
    + + +FSM:AddEndState(State) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      State :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:AddProcess(From, Event, Process, ReturnEvents) + +
    +
    + +

    Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

    + +

    Parameters

    +
      +
    • + +

      From :

      + +
    • +
    • + +

      Event :

      + +
    • +
    • + +

      Process :

      + +
    • +
    • + +

      ReturnEvents :

      + +
    • +
    +

    Return value

    + +

    Core.Fsm#FSM_PROCESS:

    + + +
    +
    +
    +
    + + +FSM:AddScore(State, ScoreText, Score) + +
    +
    + +

    Adds a score for the FSM to be achieved.

    + +

    Parameters

    +
      +
    • + +

      #string State : +is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

      + +
    • +
    • + +

      #string ScoreText : +is a text describing the score that is given according the status.

      + +
    • +
    • + +

      #number Score : +is a number providing the score of the status.

      + +
    • +
    +

    Return value

    + +

    #FSM: +self

    + +
    +
    +
    +
    + + +FSM:AddScoreProcess(From, Event, State, ScoreText, Score) + +
    +
    + +

    Adds a score for the FSM_PROCESS to be achieved.

    + +

    Parameters

    +
      +
    • + +

      #string From : +is the From State of the main process.

      + +
    • +
    • + +

      #string Event : +is the Event of the main process.

      + +
    • +
    • + +

      #string State : +is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

      + +
    • +
    • + +

      #string ScoreText : +is a text describing the score that is given according the status.

      + +
    • +
    • + +

      #number Score : +is a number providing the score of the status.

      + +
    • +
    +

    Return value

    + +

    #FSM: +self

    + +
    +
    +
    +
    + + +FSM:AddTransition(From, Event, To) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      From :

      + +
    • +
    • + +

      Event :

      + +
    • +
    • + +

      To :

      + +
    • +
    +
    +
    +
    +
    + + #string + +FSM.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetEndStates() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetProcess(From, Event) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      From :

      + +
    • +
    • + +

      Event :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:GetProcesses() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetScores() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetStartState() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetState() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetSubs() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:GetTransitions() + +
    +
    + + + +
    +
    +
    +
    + + +FSM:Is(State) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      State :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:LoadCallBacks(CallBackTable) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      CallBackTable :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:New(FsmT) + +
    +
    + +

    Creates a new FSM object.

    + +

    Parameter

    +
      +
    • + +

      FsmT :

      + +
    • +
    +

    Return value

    + +

    #FSM:

    + + +
    +
    +
    +
    + + +FSM:SetStartState(State) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      State :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_add_to_map(Map, Event) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      Map :

      + +
    • +
    • + +

      Event :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_call_handler(handler, params) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      handler :

      + +
    • +
    • + +

      params :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_create_transition(EventName) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      EventName :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_delayed_transition(EventName) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      EventName :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_eventmap(Events, EventStructure) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      Events :

      + +
    • +
    • + +

      EventStructure :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_gosub(ParentFrom, ParentEvent) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      ParentFrom :

      + +
    • +
    • + +

      ParentEvent :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_handler(EventName, ...) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      EventName :

      + +
    • +
    • + +

      ... :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_isendstate(Current) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      Current :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:_submap(subs, sub, name) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      subs :

      + +
    • +
    • + +

      sub :

      + +
    • +
    • + +

      name :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:can(e) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      e :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:cannot(e) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      e :

      + +
    • +
    +
    +
    +
    +
    + + +FSM:is(state) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      state :

      + +
    • +
    +
    +
    + +

    Type FSM_CONTROLLABLE

    + +

    FSM_CONTROLLABLE class

    + +

    Field(s)

    +
    +
    + + #string + +FSM_CONTROLLABLE.ClassName + +
    +
    + + + +
    +
    +
    +
    + + Wrapper.Controllable#CONTROLLABLE + +FSM_CONTROLLABLE.Controllable + +
    +
    + + + +
    +
    +
    +
    + + +FSM_CONTROLLABLE:GetControllable() + +
    +
    + +

    Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    + +

    Return value

    + +

    Wrapper.Controllable#CONTROLLABLE:

    + + +
    +
    +
    +
    + + +FSM_CONTROLLABLE:New(FSMT, Controllable) + +
    +
    + +

    Creates a new FSM_CONTROLLABLE object.

    + +

    Parameters

    +
      +
    • + +

      #table FSMT : +Finite State Machine Table

      + +
    • +
    • + +

      Wrapper.Controllable#CONTROLLABLE Controllable : +(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

      + +
    • +
    +

    Return value

    + +

    #FSM_CONTROLLABLE:

    + + +
    +
    +
    +
    + + +FSM_CONTROLLABLE:SetControllable(FSMControllable) + +
    +
    + +

    Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    + +

    Parameter

    + +

    Return value

    + +

    #FSM_CONTROLLABLE:

    + + +
    +
    +
    +
    + + +FSM_CONTROLLABLE:_call_handler(handler, params) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      handler :

      + +
    • +
    • + +

      params :

      + +
    • +
    +
    +
    + +

    Type FSM_PROCESS

    + +

    FSM_PROCESS class

    + +

    Field(s)

    +
    +
    + + +FSM_PROCESS:AddScore(State, ScoreText, Score) + +
    +
    + +

    Adds a score for the FSM_PROCESS to be achieved.

    + +

    Parameters

    +
      +
    • + +

      #string State : +is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

      + +
    • +
    • + +

      #string ScoreText : +is a text describing the score that is given according the status.

      + +
    • +
    • + +

      #number Score : +is a number providing the score of the status.

      + +
    • +
    +

    Return value

    + +

    #FSM_PROCESS: +self

    + +
    +
    +
    +
    + + +FSM_PROCESS:Assign(Task, ProcessUnit) + +
    +
    + +

    Assign the process to a Unit and activate the process.

    + +

    Parameters

    + +

    Return value

    + +

    #FSM_PROCESS: +self

    + +
    +
    +
    +
    + + #string + +FSM_PROCESS.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +FSM_PROCESS:Copy(Controllable, Task) + +
    +
    + +

    Creates a new FSMPROCESS object based on this FSMPROCESS.

    + +

    Parameters

    +
      +
    • + +

      Controllable :

      + +
    • +
    • + +

      Task :

      + +
    • +
    +

    Return value

    + +

    #FSM_PROCESS:

    + + +
    +
    +
    +
    + + +FSM_PROCESS:GetCommandCenter() + +
    +
    + +

    Gets the mission of the process.

    + +

    Return value

    + +

    Tasking.CommandCenter#COMMANDCENTER:

    + + +
    +
    +
    +
    + + +FSM_PROCESS:GetMission() + +
    +
    + +

    Gets the mission of the process.

    + +

    Return value

    + +

    Tasking.Mission#MISSION:

    + + +
    +
    +
    +
    + + +FSM_PROCESS:GetTask() + +
    +
    + +

    Gets the task of the process.

    + +

    Return value

    + +

    Tasking.Task#TASK:

    + + +
    +
    +
    +
    + + +FSM_PROCESS:Init(FsmProcess) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      FsmProcess :

      + +
    • +
    +
    +
    +
    +
    + + +FSM_PROCESS:Message(Message) + +
    +
    + +

    Send a message of the Task to the Group of the Unit.

    + +

    Parameter

    +
      +
    • + +

      Message :

      + +
    • +
    +
    +
    +
    +
    + + +FSM_PROCESS:New(Controllable, Task) + +
    +
    + +

    Creates a new FSM_PROCESS object.

    + +

    Parameters

    +
      +
    • + +

      Controllable :

      + +
    • +
    • + +

      Task :

      + +
    • +
    +

    Return value

    + +

    #FSM_PROCESS:

    + + +
    +
    +
    +
    + + +FSM_PROCESS:SetTask(Task) + +
    +
    + +

    Sets the task of the process.

    + +

    Parameter

    + +

    Return value

    + +

    #FSM_PROCESS:

    + + +
    +
    +
    +
    + + Tasking.Task#TASK + +FSM_PROCESS.Task + +
    +
    + + + +
    +
    +
    +
    + + +FSM_PROCESS:onenterAssigned(ProcessUnit) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      ProcessUnit :

      + +
    • +
    +
    +
    +
    +
    + + +FSM_PROCESS:onenterFailed(ProcessUnit) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      ProcessUnit :

      + +
    • +
    +
    +
    +
    +
    + + +FSM_PROCESS:onenterSuccess(ProcessUnit) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      ProcessUnit :

      + +
    • +
    +
    +
    +
    +
    + + +FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Dummy) + +
    +
    + +

    StateMachine callback function for a FSM_PROCESS

    + +

    Parameters

    + +
    +
    + +

    Type FSM_SET

    + +

    FSM_SET class

    + +

    Field(s)

    +
    +
    + + #string + +FSM_SET.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +FSM_SET:Get() + +
    +
    + +

    Gets the SETBASE object that the FSMSET governs.

    + +

    Return value

    + +

    Core.Set#SET_BASE:

    + + +
    +
    +
    +
    + + +FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) + +
    +
    + +

    Creates a new FSM_SET object.

    + +

    Parameters

    +
      +
    • + +

      #table FSMT : +Finite State Machine Table

      + +
    • +
    • + +

      SetSETBASE : +FSMSet (optional) The Set object that the FSM_SET governs.

      + +
    • +
    • + +

      FSMSet :

      + +
    • +
    +

    Return value

    + +

    #FSM_SET:

    + + +
    +
    +
    +
    + + Core.Set#SET_BASE + +FSM_SET.Set + +
    +
    + + + +
    +
    +
    +
    + + +FSM_SET:_call_handler(handler, params) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      handler :

      + +
    • +
    • + +

      params :

      + +
    • +
    +
    +
    + +

    Type FSM_TASK

    + +

    FSM_TASK class

    + +

    Field(s)

    +
    +
    + + #string + +FSM_TASK.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +FSM_TASK:New(FSMT, Task, TaskUnit) + +
    +
    + +

    Creates a new FSM_TASK object.

    + +

    Parameters

    + +

    Return value

    + +

    #FSM_TASK:

    + + +
    +
    +
    +
    + + Tasking.Task#TASK + +FSM_TASK.Task + +
    +
    + + + +
    +
    +
    +
    + + +FSM_TASK:_call_handler(handler, params) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      handler :

      + +
    • +
    • + +

      params :

      + +
    • +
    +
    +
    + +
    + + + + diff --git a/Moose Training/Documentation/Group.html b/Moose Training/Documentation/Group.html index 76ea1c0cf..88be1ab7b 100644 --- a/Moose Training/Documentation/Group.html +++ b/Moose Training/Documentation/Group.html @@ -17,7 +17,7 @@ index
    @@ -87,8 +89,8 @@ -

    1) Group#GROUP class, extends Controllable#CONTROLLABLE

    -

    The Group#GROUP class is a wrapper class to handle the DCS Group objects:

    +

    1) Wrapper.Group#GROUP class, extends Wrapper.Controllable#CONTROLLABLE

    +

    The Wrapper.Group#GROUP class is a wrapper class to handle the DCS Group objects:

    -

    The zone can be of any Zone class derived from Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.

    +

    The zone can be of any Zone class derived from Core.Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.

    Global(s)

    @@ -282,7 +284,7 @@ Use the following Zone validation methods on the group:

    GROUP:CopyRoute(Begin, End, Randomize, Radius) -

    Return the route of a group by using the Database#DATABASE class.

    +

    Return the route of a group by using the Core.Database#DATABASE class.

    @@ -602,7 +604,7 @@ All units on the ground result.

    -

    Return the route of a group by using the Database#DATABASE class.

    +

    Return the route of a group by using the Core.Database#DATABASE class.

    Parameters

    @@ -771,7 +773,7 @@ Category name = Helicopter, Airplane, Ground Unit, Ship

    Return value

    -

    DCSCoalitionObject#coalition.side: +

    Dcs.DCSCoalitionWrapper.Object#coalition.side: The coalition side of the DCS Group.

    @@ -791,7 +793,7 @@ The coalition side of the DCS Group.

    1. -

      DCScountry#country.id: +

      Dcs.DCScountry#country.id: The country identifier.

    2. @@ -817,7 +819,7 @@ The DCS Group is not existing or alive.

      Return value

      -

      DCSGroup#Group: +

      Dcs.DCSWrapper.Group#Group: The DCS Group.

      @@ -847,7 +849,7 @@ The number of the DCS Unit to be returned.

      Return value

      -

      DCSUnit#Unit: +

      Dcs.DCSWrapper.Unit#Unit: The DCS Unit.

      @@ -1074,7 +1076,7 @@ The number of the UNIT wrapper class to be returned.

      Return value

      -

      Unit#UNIT: +

      Wrapper.Unit#UNIT: The UNIT wrapper class.

      @@ -1110,7 +1112,7 @@ The UNITs wrappers.

      Return value

      -

      DCSTypes#Vec2: +

      Dcs.DCSTypes#Vec2: Current Vec2 point of the first DCS Unit of the DCS Group.

      @@ -1128,7 +1130,7 @@ Current Vec2 point of the first DCS Unit of the DCS Group.

      Return value

      -

      DCSTypes#Vec3: +

      Dcs.DCSTypes#Vec3: Current Vec3 of the first DCS Unit of the GROUP.

      @@ -1222,7 +1224,7 @@ true if the DCS Group is alive.

    @@ -87,8 +89,8 @@ -

    1) Identifiable#IDENTIFIABLE class, extends Object#OBJECT

    -

    The Identifiable#IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

    +

    1) #IDENTIFIABLE class, extends Wrapper.Object#OBJECT

    +

    The #IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

    @@ -113,6 +115,12 @@ A CLIENT needs to be registered within the Type MISSION + + + + + + + + @@ -170,6 +184,18 @@ A CLIENT needs to be registered within the MISSION.FindClient(CLIENT, self, ClientName) + + + + + + + + @@ -197,7 +223,7 @@ A CLIENT needs to be registered within the MISSION.GetTask(TaskIndex, TaskID, self, TaskName) + @@ -212,6 +238,12 @@ A CLIENT needs to be registered within the MISSION.GoalFunction + + + + @@ -239,9 +271,9 @@ A CLIENT needs to be registered within the MISSION:Meta() + @@ -260,12 +292,6 @@ A CLIENT needs to be registered within the MISSION.MissionMenu - - - - @@ -311,7 +337,7 @@ A CLIENT needs to be registered within the MISSION:New(MissionName, MissionPriority, MissionBriefing, MissionCoalition) + @@ -347,15 +373,27 @@ A CLIENT needs to be registered within the MISSION:ReportToAll() + - + + + + + + + + + @@ -377,7 +415,7 @@ A CLIENT needs to be registered within the MISSION:SetPlannedMenu() + @@ -404,12 +442,6 @@ A CLIENT needs to be registered within the MISSION.TaskTypeMenus - - - - @@ -428,6 +460,18 @@ A CLIENT needs to be registered within the MISSION._GoalTasks + + + + + + + +
    MISSION:AbortUnit(PlayerUnit) +

    Aborts a PlayerUnit from the Mission.

    +
    MISSION.AddClient(CLIENT, self, Client)

    Register a new CLIENT to participate within the mission.

    @@ -152,6 +160,12 @@ A CLIENT needs to be registered within the MISSION:Completed()

    Set a Mission to completed.

    +
    MISSION:CrashUnit(PlayerUnit) +

    Handles a crash of a PlayerUnit from the Mission.

    Find a CLIENT object within the MISSION by its ClientName.

    +
    MISSION:GetCommandCenter() +

    Gets the COMMANDCENTER.

    +
    MISSION:GetGroups() +

    Get the groups for which TASKS are given in the mission

    MISSION.GetTask(TaskName, self)

    Get the TASK identified by the TaskNumber from the Mission.

    +
    MISSION:HasGroup(TaskGroup) +
    MISSION:JoinUnit(PlayerUnit) - +

    Add a Unit to join the Mission.

    -
    MISSION.MissionPriority -
    MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition)

    This is the main MISSION declaration method.

    MISSION:ReportDetails() -

    Report the status of all MISSIONs to all active Clients.

    +

    Create a detailed report of the Mission, listing all the details of the Task.

    MISSION:ReportTrigger()MISSION:ReportOverview() -

    Handles the reporting.

    +

    Create a overview report of the Mission (multiple lines).

    +
    MISSION:ReportSummary() +

    Create a summary report of the Mission (one line).

    +
    MISSION:ReportToAll() +

    Report the status of all MISSIONs to all active Clients.

    MISSION:SetMenu(CommandCenterMenu)

    Sets the Planned Task menu.

    -
    MISSION.Tasks -
    +
    MISSION:onbeforeComplete(Event, From, To) +

    FSM function for a MISSION

    +
    MISSION:onenterCompleted(Event, From, To) +

    FSM function for a MISSION

    @@ -614,6 +658,38 @@ A CLIENT needs to be registered within the
    + +MISSION:AbortUnit(PlayerUnit) + +
    +
    + +

    Aborts a PlayerUnit from the Mission.

    + + +

    For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

    + +

    Parameter

    + +

    Return value

    + +

    #boolean: +true if Unit is part of a Task in the Mission.

    + +
    + +
    +
    + MISSION.AddClient(CLIENT, self, Client) @@ -770,14 +846,14 @@ Each Task can be set a certain Goals. The Mission will not be completed until al

    Return value

    -

    Task#TASK_BASE: +

    Tasking.Task#TASK: The task added.

    @@ -825,6 +901,38 @@ self

    Set a Mission to completed.

    + +
    +
    +
    + + +MISSION:CrashUnit(PlayerUnit) + +
    +
    + +

    Handles a crash of a PlayerUnit from the Mission.

    + + +

    For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

    + +

    Parameter

    +
      +
    • + +

      Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player crashing.

      + +
    • +
    +

    Return value

    + +

    #boolean: +true if Unit is part of a Task in the Mission.

    +
    @@ -893,6 +1001,42 @@ ClientName is a string defining the Client Group as defined within the ME.

    -- Seach for Client "Bomber" within the Mission.
     local BomberClient = Mission:FindClient( "Bomber" )
    + +
    +
    +
    + + +MISSION:GetCommandCenter() + +
    +
    + +

    Gets the COMMANDCENTER.

    + +

    Return value

    + +

    Tasking.CommandCenter#COMMANDCENTER:

    + + +
    +
    +
    +
    + + +MISSION:GetGroups() + +
    +
    + +

    Get the groups for which TASKS are given in the mission

    + +

    Return value

    + +

    Core.Set#SET_GROUP:

    + +
    @@ -910,13 +1054,13 @@ local BomberClient = Mission:FindClient( "Bomber" )

    Return value

    -

    Menu#MENU_COALITION: +

    Core.Menu#MENU_COALITION: self

    @@ -954,14 +1098,14 @@ self

    Return value

    -

    Task#TASK_BASE: +

    Tasking.Task#TASK: The task added.

    @@ -988,7 +1132,7 @@ Scoring

    -MISSION.GetTask(TaskIndex, TaskID, self, TaskName) +MISSION.GetTask(TaskName, self)
    @@ -1002,32 +1146,21 @@ Scoring

    • -

      #string TaskIndex : -is the Index of the Task within the Mission.

      - -
    • -
    • - -

      #number TaskID : -is the ID of the Task within the Mission.

      +

      #string TaskName : +The Name of the Task within the Mission.

    • self :

      -
    • -
    • - -

      TaskName :

      -

    Return values

    1. -

      Task#TASK_BASE: +

      Tasking.Task#TASK: The Task

    2. @@ -1077,6 +1210,27 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" ) +
    +
    +
    +
    + + +MISSION:HasGroup(TaskGroup) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      TaskGroup :

      + +
    • +
    @@ -1148,13 +1302,32 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    - -MISSION:Meta() + +MISSION:JoinUnit(PlayerUnit)
    +

    Add a Unit to join the Mission.

    + +

    For each Task within the Mission, the Unit is joined with the Task. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

    + +

    Parameter

    +
      +
    • + +

      Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player joining the Mission.

      + +
    • +
    +

    Return value

    + +

    #boolean: +true if Unit is part of a Task in the Mission.

    @@ -1175,7 +1348,7 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    - + #string MISSION.MissionCoalition @@ -1189,7 +1362,7 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    - Menu#MENU_COALITION + Core.Menu#MENU_COALITION MISSION.MissionMenu @@ -1198,20 +1371,6 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" ) - -
    -
    -
    - - - -MISSION.MissionPriority - -
    -
    - - -
    @@ -1301,7 +1460,7 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    - + #string MISSION.Name @@ -1316,7 +1475,7 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    -MISSION:New(MissionName, MissionPriority, MissionBriefing, MissionCoalition) +MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition)
    @@ -1330,6 +1489,11 @@ env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
    • +

      Tasking.CommandCenter#COMMANDCENTER CommandCenter :

      + +
    • +
    • +

      #string MissionName : is the name of the mission. This name will be used to reference the status of each mission by the players.

      @@ -1348,7 +1512,7 @@ is a string indicating the mission briefing to be shown when a player joins a
    • -

      DCSCoalitionObject#coalition MissionCoalition : +

      Dcs.DCSCoalitionWrapper.Object#coalition MissionCoalition : is a string indicating the coalition or party to which this mission belongs to. It is free format and can be chosen freely by the mission designer. Note that this field is not to be confused with the coalition concept of the ME. Examples of a Mission Coalition could be "NATO", "CCCP", "Intruders", "Terrorists"...

    • @@ -1419,7 +1583,7 @@ Each Task can be set a certain Goals. The Mission will not be completed until al
    +
    +
    +
    + + +MISSION:ReportDetails() + +
    +
    + +

    Create a detailed report of the Mission, listing all the details of the Task.

    + +

    Return value

    + +

    #string:

    + + +
    +
    +
    +
    + + +MISSION:ReportOverview() + +
    +
    + +

    Create a overview report of the Mission (multiple lines).

    + +

    Return value

    + +

    #string:

    + + +
    +
    +
    +
    + + +MISSION:ReportSummary() + +
    +
    + +

    Create a summary report of the Mission (one line).

    + +

    Return value

    + +

    #string:

    + +
    @@ -1468,22 +1686,6 @@ self

    Report the status of all MISSIONs to all active Clients.

    - -
    -
    -
    - - -MISSION:ReportTrigger() - -
    -
    - -

    Handles the reporting.

    - - -

    After certain time intervals, a MISSION report MESSAGE will be shown to All Players.

    -
    @@ -1529,7 +1731,7 @@ self

    diff --git a/Moose Training/Documentation/Menu.html b/Moose Training/Documentation/Menu.html index 99369d601..8c0552dd9 100644 --- a/Moose Training/Documentation/Menu.html +++ b/Moose Training/Documentation/Menu.html @@ -17,7 +17,7 @@ index
    @@ -103,19 +105,19 @@ On top, MOOSE implements variable parameter passing for command

    To manage main menus, the classes begin with MENU_:

    To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENUCOMMAND:


    @@ -127,10 +129,10 @@ On top, MOOSE implements variable parameter passing for command These are simply abstract base classes defining a couple of fields that are used by the derived MENU_ classes to manage menus.

    -

    1.1) Menu#MENU_BASE class, extends Base#BASE

    +

    1.1) Core.Menu#MENU_BASE class, extends Core.Base#BASE

    The #MENU_BASE class defines the main MENU class where other MENU classes are derived from.

    -

    1.2) Menu#MENUCOMMANDBASE class, extends Base#BASE

    +

    1.2) Core.Menu#MENUCOMMANDBASE class, extends Core.Base#BASE

    The #MENUCOMMANDBASE class defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.


    @@ -140,13 +142,13 @@ derived MENU_ classes to manage menus.

    2) MENU MISSION classes

    The underlying classes manage the menus for a complete mission file.

    -

    2.1) Menu#MENU_MISSION class, extends Menu#MENU_BASE

    -

    The Menu#MENU_MISSION class manages the main menus for a complete mission.
    +

    2.1) Menu#MENU_MISSION class, extends Core.Menu#MENU_BASE

    +

    The Core.Menu#MENU_MISSION class manages the main menus for a complete mission.
    You can add menus with the MENU_MISSION.New method, which constructs a MENU_MISSION object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION.Remove.

    -

    2.2) Menu#MENUMISSIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    -

    The Menu#MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
    +

    2.2) Menu#MENUMISSIONCOMMAND class, extends Core.Menu#MENUCOMMANDBASE

    +

    The Core.Menu#MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
    You can add menus with the MENUMISSIONCOMMAND.New method, which constructs a MENUMISSIONCOMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUMISSIONCOMMAND.Remove.

    @@ -155,13 +157,13 @@ Using this object reference, you can then remove ALL the menus and submenus unde

    3) MENU COALITION classes

    The underlying classes manage the menus for whole coalitions.

    -

    3.1) Menu#MENU_COALITION class, extends Menu#MENU_BASE

    -

    The Menu#MENU_COALITION class manages the main menus for coalitions.
    +

    3.1) Menu#MENU_COALITION class, extends Core.Menu#MENU_BASE

    +

    The Core.Menu#MENU_COALITION class manages the main menus for coalitions.
    You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.

    -

    3.2) Menu#MENUCOALITIONCOMMAND class, extends Menu#MENUCOMMANDBASE

    -

    The Menu#MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    +

    3.2) Menu#MENUCOALITIONCOMMAND class, extends Core.Menu#MENUCOMMANDBASE

    +

    The Core.Menu#MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    You can add menus with the MENUCOALITIONCOMMAND.New method, which constructs a MENUCOALITIONCOMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCOALITIONCOMMAND.Remove.

    @@ -170,13 +172,13 @@ Using this object reference, you can then remove ALL the menus and submenus unde

    4) MENU GROUP classes

    The underlying classes manage the menus for groups. Note that groups can be inactive, alive or can be destroyed.

    -

    4.1) Menu#MENU_GROUP class, extends Menu#MENU_BASE

    -

    The Menu#MENU_GROUP class manages the main menus for coalitions.
    +

    4.1) Menu#MENU_GROUP class, extends Core.Menu#MENU_BASE

    +

    The Core.Menu#MENU_GROUP class manages the main menus for coalitions.
    You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.

    -

    4.2) Menu#MENUGROUPCOMMAND class, extends Menu#MENUCOMMANDBASE

    -

    The Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    +

    4.2) Menu#MENUGROUPCOMMAND class, extends Core.Menu#MENUCOMMANDBASE

    +

    The Core.Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    You can add menus with the MENUGROUPCOMMAND.New method, which constructs a MENUGROUPCOMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUGROUPCOMMAND.Remove.

    @@ -185,13 +187,13 @@ Using this object reference, you can then remove ALL the menus and submenus unde

    5) MENU CLIENT classes

    The underlying classes manage the menus for units with skill level client or player.

    -

    5.1) Menu#MENU_CLIENT class, extends Menu#MENU_BASE

    -

    The Menu#MENU_CLIENT class manages the main menus for coalitions.
    +

    5.1) Menu#MENU_CLIENT class, extends Core.Menu#MENU_BASE

    +

    The Core.Menu#MENU_CLIENT class manages the main menus for coalitions.
    You can add menus with the MENU_CLIENT.New method, which constructs a MENU_CLIENT object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_CLIENT.Remove.

    -

    5.2) Menu#MENUCLIENTCOMMAND class, extends Menu#MENUCOMMANDBASE

    -

    The Menu#MENUCLIENTCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    +

    5.2) Menu#MENUCLIENTCOMMAND class, extends Core.Menu#MENUCOMMANDBASE

    +

    The Core.Menu#MENUCLIENTCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
    You can add menus with the MENUCLIENTCOMMAND.New method, which constructs a MENUCLIENTCOMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCLIENTCOMMAND.Remove.

    @@ -438,12 +440,54 @@ Using this object reference, you can then remove ALL the menus and submenus unde MENU_GROUP.ClassName + + + + MENU_GROUP.MenuGroup + + + + + + MENU_GROUP.MenuGroupID + + + + + + MENU_GROUP.MenuPath + + + + + + MENU_GROUP.MenuText + + + + + + MENU_GROUP.Menus + + MENU_GROUP:New(MenuGroup, MenuText, ParentMenu)

    MENU_GROUP constructor.

    + + + + MENU_GROUP.ParentMenu + + + + + + MENU_GROUP.Path + + @@ -466,12 +510,48 @@ Using this object reference, you can then remove ALL the menus and submenus unde MENU_GROUP_COMMAND.ClassName + + + + MENU_GROUP_COMMAND.MenuGroup + + + + + + MENU_GROUP_COMMAND.MenuGroupID + + + + + + MENU_GROUP_COMMAND.MenuPath + + + + + + MENU_GROUP_COMMAND.MenuText + + MENU_GROUP_COMMAND:New(MenuGroup, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)

    Creates a new radio command item for a group

    + + + + MENU_GROUP_COMMAND.ParentMenu + + + + + + MENU_GROUP_COMMAND.Path + + @@ -790,7 +870,7 @@ Using this object reference, you can then remove ALL the menus and submenus unde MenuStatus[MenuClientName]:Remove() end - --- @param Client#CLIENT MenuClient + --- @param Wrapper.Client#CLIENT MenuClient local function AddStatusMenu( MenuClient ) local MenuClientName = MenuClient:GetName() -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. @@ -851,7 +931,7 @@ Using this object reference, you can then remove ALL the menus and submenus unde
    @@ -87,22 +89,22 @@ -

    1) Message#MESSAGE class, extends Base#BASE

    +

    1) Core.Message#MESSAGE class, extends Core.Base#BASE

    Message System to display Messages to Clients, Coalitions or All. Messages are shown on the display panel for an amount of seconds, and will then disappear. Messages can contain a category which is indicating the category of the message.

    1.1) MESSAGE construction methods

    -

    Messages are created with Message#MESSAGE.New. Note that when the MESSAGE object is created, no message is sent yet. +

    Messages are created with Core.Message#MESSAGE.New. Note that when the MESSAGE object is created, no message is sent yet. To send messages, you need to use the To functions.

    1.2) Send messages with MESSAGE To methods

    Messages are sent to:

    @@ -368,7 +370,7 @@ MessageBLUE:ToBlue()
    @@ -89,7 +91,7 @@
    -

    1) MissileTrainer#MISSILETRAINER class, extends Base#BASE

    +

    1) Functional.MissileTrainer#MISSILETRAINER class, extends Core.Base#BASE

    The #MISSILETRAINER class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, the class will destroy the missile within a certain range, to avoid damage to your aircraft. It suports the following functionality:

    @@ -453,7 +455,7 @@ Together with the 476 virtual team, we tested the MISSILETRAINE
    - Set#SET_CLIENT + Core.Set#SET_CLIENT MISSILETRAINER.DBClients @@ -980,7 +982,7 @@ The distance in meters when a tracked missile needs to be destroyed when close t diff --git a/Moose Training/Documentation/Object.html b/Moose Training/Documentation/Object.html index f2fbf901d..00eff6a9b 100644 --- a/Moose Training/Documentation/Object.html +++ b/Moose Training/Documentation/Object.html @@ -17,7 +17,7 @@ index
    @@ -87,8 +89,8 @@ -

    1) Object#OBJECT class, extends Base#BASE

    -

    The Object#OBJECT class is a wrapper class to handle the DCS Object objects:

    +

    1) Wrapper.Object#OBJECT class, extends Core.Base#BASE

    +

    The Wrapper.Object#OBJECT class is a wrapper class to handle the DCS Object objects:

    @@ -89,8 +91,8 @@
    -

    1) #PATROLZONE class, extends StateMachine#STATEMACHINE

    -

    The #PATROLZONE class implements the core functions to patrol a Zone by an AIR Controllable Group. +

    1) #AI_PATROLZONE class, extends Core.Fsm#FSM_CONTROLLABLE

    +

    The #AI_PATROLZONE class implements the core functions to patrol a Zone by an AIR Controllable Group. The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, a random point is selected as the route point within the 3D space, within the given boundary limits. The airplane will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. @@ -98,52 +100,52 @@ Upon arrival at the random 3D point, a new 3D random point will be selected with This cycle will continue until a fuel treshold has been reached by the airplane. When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

    -

    1.1) PATROLZONE constructor:

    +

    1.1) AI_PATROLZONE constructor:

    -

    1.2) PATROLZONE state machine:

    -

    The PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

    +

    1.2) AI_PATROLZONE state machine:

    +

    The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

    -

    1.2.1) PATROLZONE Events:

    +

    1.2.1) AI_PATROLZONE Events:

    -

    1.2.2) PATROLZONE States:

    +

    1.2.2) AI_PATROLZONE States:

    -

    1.2.3) PATROLZONE state transition functions:

    +

    1.2.3) AI_PATROLZONE state transition methods:

    State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition functions will be called by the state machine:

    +There are 2 moments when state transition methods will be called by the state machine:

    -

    An example how to manage a state transition for an PATROLZONE object Patrol for the state RTB:

    +

    An example how to manage a state transition for an AI_PATROLZONE object Patrol for the state RTB:

     local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" )
      local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
    @@ -151,49 +153,49 @@ There are 2 moments when state transition functions will be called by the state
      local PatrolSpawn = SPAWN:New( "Patrol Group" )
      local PatrolGroup = PatrolSpawn:Spawn()
     
    - local Patrol = PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 )
    + local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 )
      Patrol:SetControllable( PatrolGroup )
      Patrol:ManageFuel( 0.2, 60 )
     
    -

    OnBeforeRTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but before the RTB default action is processed by the PATROLZONE object.

    +

    OnBeforeRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but before the RTB default action is processed by the AIPATROLZONE object.

    -
     --- State transition function for the PATROLZONE **Patrol** object
    - -- @param #PATROLZONE self 
    - -- @param Controllable#CONTROLLABLE AIGroup
    - -- @return #boolean If false is returned, then the OnAfter state transition function will not be called.
    +
     --- State transition function for the AI_PATROLZONE **Patrol** object
    + -- @param #AI_PATROLZONE self 
    + -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
    + -- @return #boolean If false is returned, then the OnAfter state transition method will not be called.
      function Patrol:OnBeforeRTB( AIGroup )
        AIGroup:MessageToRed( "Returning to base", 20 )
      end
     
    -

    OnAfterRTB( AIGroup ) will be called by the PATROLZONE object when the AIGroup reports RTB, but after the RTB default action was processed by the PATROLZONE object.

    +

    OnAfterRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but after the RTB default action was processed by the AIPATROLZONE object.

    -
     --- State transition function for the PATROLZONE **Patrol** object
    - -- @param #PATROLZONE self 
    - -- @param Controllable#CONTROLLABLE AIGroup
    - -- @return #Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone.
    +
     --- State transition function for the AI_PATROLZONE **Patrol** object
    + -- @param #AI_PATROLZONE self 
    + -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
    + -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone.
      function Patrol:OnAfterRTB( AIGroup )
        return PatrolSpawn:Spawn()
      end 
     
    -

    1.3) Manage the PATROLZONE parameters:

    -

    The following methods are available to modify the parameters of a PATROLZONE object:

    +

    1.3) Manage the AI_PATROLZONE parameters:

    +

    The following methods are available to modify the parameters of a AI_PATROLZONE object:

    -

    1.3) Manage the out of fuel in the PATROLZONE:

    +

    1.3) Manage the out of fuel in the AI_PATROLZONE:

    When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. Once the time is finished, the old AIControllable will return to the base. -Use the method PATROLZONE.ManageFuel() to have this proces in place.

    +Use the method AI_PATROLZONE.ManageFuel() to have this proces in place.


    @@ -232,7 +234,7 @@ Use the method PATROLZONE.ManageFuel() t

    Global(s)

    - + @@ -244,112 +246,112 @@ Use the method PATROLZONE.ManageFuel() t
    PATROLZONEAI_PATROLZONE
    -

    Type PATROLZONE

    +

    Type AI_PATROLZONE

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -360,9 +362,9 @@ Use the method PATROLZONE.ManageFuel() t
    - #PATROLZONE - -PATROLZONE + #AI_PATROLZONE + +AI_PATROLZONE
    @@ -386,7 +388,7 @@ Use the method PATROLZONE.ManageFuel() t @@ -394,17 +396,17 @@ Use the method PATROLZONE.ManageFuel() t

    Type Patrol

    -

    Type PATROLZONE

    +

    Type AI_PATROLZONE

    -

    PATROLZONE class

    +

    AI_PATROLZONE class

    Field(s)

    - Controllable#CONTROLLABLE - -PATROLZONE.AIControllable + Wrapper.Controllable#CONTROLLABLE + +AI_PATROLZONE.AIControllable
    @@ -417,8 +419,8 @@ Use the method PATROLZONE.ManageFuel() t
    #string - -PATROLZONE.ClassName + +AI_PATROLZONE.ClassName
    @@ -430,8 +432,8 @@ Use the method PATROLZONE.ManageFuel() t
    - -PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) + +AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)
    @@ -440,7 +442,7 @@ Use the method PATROLZONE.ManageFuel() t

    Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the PATROLZONE. +When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. Once the time is finished, the old AIControllable will return to the base.

    Parameters

    @@ -460,7 +462,7 @@ The amount of seconds the out of fuel AIControllable will orbit before returning

    Return value

    -

    #PATROLZONE: +

    #AI_PATROLZONE: self

    @@ -468,65 +470,65 @@ self

    - -PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) + +AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed)
    -

    Creates a new PATROLZONE object

    +

    Creates a new AI_PATROLZONE object

    Parameters

    Return value

    -

    #PATROLZONE: +

    #AI_PATROLZONE: self

    Usage:

    -
    -- Define a new PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
    +		
    -- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
     PatrolZone = ZONE:New( 'PatrolZone' )
     PatrolSpawn = SPAWN:New( 'Patrol Group' )
    -PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    +PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -PATROLZONE:OnAfterRoute(Controllable) + +AI_PATROLZONE:OnAfterRoute(Controllable)
    @@ -537,7 +539,7 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) @@ -546,8 +548,8 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -PATROLZONE:OnBeforeRoute(Controllable) + +AI_PATROLZONE:OnBeforeRoute(Controllable)
    @@ -558,7 +560,7 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 ) @@ -572,9 +574,9 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - DCSTypes#Altitude - -PATROLZONE.PatrolCeilingAltitude + Dcs.DCSTypes#Altitude + +AI_PATROLZONE.PatrolCeilingAltitude
    @@ -586,9 +588,9 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - DCSTypes#Altitude - -PATROLZONE.PatrolFloorAltitude + Dcs.DCSTypes#Altitude + +AI_PATROLZONE.PatrolFloorAltitude
    @@ -601,8 +603,8 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -PATROLZONE.PatrolFuelTresholdPercentage + +AI_PATROLZONE.PatrolFuelTresholdPercentage
    @@ -615,8 +617,8 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    #boolean - -PATROLZONE.PatrolManageFuel + +AI_PATROLZONE.PatrolManageFuel
    @@ -628,9 +630,9 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - DCSTypes#Speed - -PATROLZONE.PatrolMaxSpeed + Dcs.DCSTypes#Speed + +AI_PATROLZONE.PatrolMaxSpeed
    @@ -642,9 +644,9 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - DCSTypes#Speed - -PATROLZONE.PatrolMinSpeed + Dcs.DCSTypes#Speed + +AI_PATROLZONE.PatrolMinSpeed
    @@ -657,8 +659,8 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -PATROLZONE.PatrolOutOfFuelOrbitTime + +AI_PATROLZONE.PatrolOutOfFuelOrbitTime
    @@ -670,9 +672,9 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - Zone#ZONE_BASE - -PATROLZONE.PatrolZone + Core.Zone#ZONE_BASE + +AI_PATROLZONE.PatrolZone
    @@ -684,8 +686,8 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
    - -PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) + +AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)
    @@ -696,20 +698,20 @@ PatrolArea = PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )

    Return value

    -

    #PATROLZONE: +

    #AI_PATROLZONE: self

    @@ -717,8 +719,8 @@ self

    - -PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) + +AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)
    @@ -729,20 +731,20 @@ self

    Return value

    -

    #PATROLZONE: +

    #AI_PATROLZONE: self

    @@ -750,8 +752,8 @@ self

    - -PATROLZONE:onenterPatrol() + +AI_PATROLZONE:onenterPatrol()
    @@ -763,8 +765,8 @@ self

    - -PATROLZONE:onenterRoute() + +AI_PATROLZONE:onenterRoute()
    @@ -773,7 +775,7 @@ self

    Return value

    -

    #PATROLZONE: +

    #AI_PATROLZONE: self

    diff --git a/Moose Training/Documentation/Point.html b/Moose Training/Documentation/Point.html index f60d643ea..589adc82b 100644 --- a/Moose Training/Documentation/Point.html +++ b/Moose Training/Documentation/Point.html @@ -17,7 +17,7 @@ index
    @@ -87,8 +89,8 @@ -

    1) Point#POINT_VEC3 class, extends Base#BASE

    -

    The Point#POINT_VEC3 class defines a 3D point in the simulator.

    +

    1) Core.Point#POINT_VEC3 class, extends Core.Base#BASE

    +

    The Core.Point#POINT_VEC3 class defines a 3D point in the simulator.

    Important Note: Most of the functions in this section were taken from MIST, and reworked to OO concepts. In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.

    @@ -98,19 +100,19 @@ In order to keep the credibility of the the author, I want to emphasize that the -

    2) Point#POINT_VEC2 class, extends Point#POINT_VEC3

    -

    The Point#POINT_VEC2 class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.

    +

    2) Core.Point#POINT_VEC2 class, extends Core.Point#POINT_VEC3

    +

    The Core.Point#POINT_VEC2 class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.

    2.1) POINT_VEC2 constructor

    A new POINT_VEC2 instance can be created with:


    @@ -178,7 +180,7 @@ In order to keep the credibility of the the author, I want to emphasize that the
    @@ -655,7 +657,7 @@ The reference #POINT_VEC2.

    Return value

    -

    DCSTypes#Distance: +

    Dcs.DCSTypes#Distance: The distance from the reference #POINT_VEC2 in meters.

    @@ -669,21 +671,21 @@ The distance from the reference #POINT_VEC2 in mete
    -

    Calculate the distance from a reference DCSTypes#Vec2.

    +

    Calculate the distance from a reference Dcs.DCSTypes#Vec2.

    Parameter

    Return value

    -

    DCSTypes#Distance: -The distance from the reference DCSTypes#Vec2 in meters.

    +

    Dcs.DCSTypes#Distance: +The distance from the reference Dcs.DCSTypes#Vec2 in meters.

    @@ -774,26 +776,26 @@ The y coodinate.

    Return value

    -

    Point#POINT_VEC2:

    +

    Core.Point#POINT_VEC2:

    @@ -813,7 +815,7 @@ The y coordinate of the Vec3 point, pointing to the Right.

    Return value

    -

    Point#POINT_VEC2: +

    Core.Point#POINT_VEC2: self

    @@ -845,14 +847,14 @@ self

    Return value

    -

    Point#POINT_VEC2: +

    Core.Point#POINT_VEC2: self

    @@ -926,13 +928,13 @@ The y coordinate.

    Return value

    -

    DCSTypes#Distance: +

    Dcs.DCSTypes#Distance: Distance The distance in meters.

    @@ -1254,7 +1256,7 @@ The BR text.

    Return value

    -

    DCSTypes#Vec3: +

    Dcs.DCSTypes#Vec3: DirectionVec3 The direction vector in Vec3 format.

    @@ -1326,12 +1328,12 @@ CorrectionRadians The correction in radians.

    @@ -1357,12 +1359,12 @@ CorrectionRadians The correction in radians.

    @@ -1388,18 +1390,18 @@ CorrectionRadians The correction in radians.

    Return value

    -

    DCSTypes#Vec2: +

    Dcs.DCSTypes#Vec2: Vec2

    @@ -1419,18 +1421,18 @@ Vec2

    Return value

    -

    DCSTypes#Vec3: +

    Dcs.DCSTypes#Vec3: Vec3

    @@ -1448,7 +1450,7 @@ Vec3

    Return value

    -

    DCSTypes#Vec2: +

    Dcs.DCSTypes#Vec2: The Vec2 coodinate.

    @@ -1466,7 +1468,7 @@ The Vec2 coodinate.

    Return value

    -

    DCSTypes#Vec3: +

    Dcs.DCSTypes#Vec3: The Vec3 coodinate.

    @@ -1572,26 +1574,26 @@ Metric true means metric, false means NM.

    Return value

    -

    Point#POINT_VEC3: +

    Core.Point#POINT_VEC3: self

    @@ -1611,14 +1613,14 @@ self

    Return value

    -

    Point#POINT_VEC3: +

    Core.Point#POINT_VEC3: self

    @@ -1670,7 +1672,7 @@ The route point action.

  • -

    DCSTypes#Speed Speed : +

    Dcs.DCSTypes#Speed Speed : Airspeed in km/h.

  • @@ -1717,7 +1719,7 @@ The route point.

    @@ -87,8 +89,8 @@ -

    1) Positionable#POSITIONABLE class, extends Identifiable#IDENTIFIABLE

    -

    The Positionable#POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

    +

    1) Wrapper.Positionable#POSITIONABLE class, extends Wrapper.Identifiable#IDENTIFIABLE

    +

    The Wrapper.Positionable#POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

    + + + + @@ -162,25 +170,25 @@ @@ -205,6 +213,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -291,7 +341,7 @@
    1. -

      DCSTypes#Distance: +

      Dcs.DCSTypes#Distance: The altitude of the POSITIONABLE.

    2. @@ -320,6 +370,39 @@ The POSITIONABLE is not existing or alive.

      #number: The POSTIONABLE heading

      + + +
      +
      + + +POSITIONABLE:GetMessage(Message, Duration) + +
      +
      + +

      Returns a message with the callsign embedded (if there is one).

      + +

      Parameters

      +
        +
      • + +

        #string Message : +The message text

        + +
      • +
      • + +

        Dcs.DCSTypes#Duration Duration : +The duration of the message.

        + +
      • +
      +

      Return value

      + +

      Core.Message#MESSAGE:

      + +
      @@ -337,7 +420,7 @@ The POSTIONABLE heading

      1. -

        Point#POINT_VEC2: +

        Core.Point#POINT_VEC2: The 2D point vector of the POSITIONABLE.

      2. @@ -359,13 +442,13 @@ The POSITIONABLE is not existing or alive.

        -

        Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

        +

        Returns the Dcs.DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

        Return values

        1. -

          DCSTypes#Position: +

          Dcs.DCSTypes#Position: The 3D position vectors of the POSITIONABLE.

        2. @@ -387,7 +470,7 @@ The POSITIONABLE is not existing or alive.

          -

          Returns a random DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

          +

          Returns a random Dcs.DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

          Parameter

    PATROLZONE.AIControllableAI_PATROLZONE.AIControllable

    The Controllable patrolling.

    PATROLZONE.ClassNameAI_PATROLZONE.ClassName
    PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)

    When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base.

    PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed)AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) -

    Creates a new PATROLZONE object

    +

    Creates a new AI_PATROLZONE object

    PATROLZONE:OnAfterRoute(Controllable)AI_PATROLZONE:OnAfterRoute(Controllable)

    OnAfter State Transition Function

    PATROLZONE:OnBeforeRoute(Controllable)AI_PATROLZONE:OnBeforeRoute(Controllable)

    OnBefore State Transition Function

    PATROLZONE.PatrolCeilingAltitudeAI_PATROLZONE.PatrolCeilingAltitude

    The highest altitude in meters where to execute the patrol.

    PATROLZONE.PatrolFloorAltitudeAI_PATROLZONE.PatrolFloorAltitude

    The lowest altitude in meters where to execute the patrol.

    PATROLZONE.PatrolFuelTresholdPercentageAI_PATROLZONE.PatrolFuelTresholdPercentage
    PATROLZONE.PatrolManageFuelAI_PATROLZONE.PatrolManageFuel
    PATROLZONE.PatrolMaxSpeedAI_PATROLZONE.PatrolMaxSpeed

    The maximum speed of the Controllable in km/h.

    PATROLZONE.PatrolMinSpeedAI_PATROLZONE.PatrolMinSpeed

    The minimum speed of the Controllable in km/h.

    PATROLZONE.PatrolOutOfFuelOrbitTimeAI_PATROLZONE.PatrolOutOfFuelOrbitTime
    PATROLZONE.PatrolZoneAI_PATROLZONE.PatrolZone

    The Zone where the patrol needs to be executed.

    PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)

    Sets the floor and ceiling altitude of the patrol.

    PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)

    Sets (modifies) the minimum and maximum speed of the patrol.

    PATROLZONE:onenterPatrol()AI_PATROLZONE:onenterPatrol()
    PATROLZONE:onenterRoute()AI_PATROLZONE:onenterRoute()

    Defines a new patrol route using the Process_PatrolZone parameters and settings.

    POINT_VEC2:DistanceFromVec2(Vec2Reference) -

    Calculate the distance from a reference DCSTypes#Vec2.

    +

    Calculate the distance from a reference Dcs.DCSTypes#Vec2.

    POSITIONABLE:GetHeading()

    Returns the POSITIONABLE heading in degrees.

    +
    POSITIONABLE:GetMessage(Message, Duration) +

    Returns a message with the callsign embedded (if there is one).

    POSITIONABLE:GetPositionVec3() -

    Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    +

    Returns the Dcs.DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

    POSITIONABLE:GetRandomVec3(Radius) -

    Returns a random DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

    +

    Returns a random Dcs.DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

    POSITIONABLE:GetVec2() -

    Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

    +

    Returns the Dcs.DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

    POSITIONABLE:GetVec3() -

    Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

    +

    Returns the Dcs.DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

    POSITIONABLE:IsAboveRunway()

    Returns if the Positionable is located above a runway.

    +
    POSITIONABLE:Message(Message, Duration) +

    Send a message to the players in the Group.

    +
    POSITIONABLE:MessageToAll(Message, Duration) +

    Send a message to all coalitions.

    +
    POSITIONABLE:MessageToBlue(Message, Duration) +

    Send a message to the blue coalition.

    +
    POSITIONABLE:MessageToClient(Message, Duration, Client) +

    Send a message to a client.

    +
    POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition) +

    Send a message to a coalition.

    +
    POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup) +

    Send a message to a Group.

    +
    POSITIONABLE:MessageToRed(Message, Duration) +

    Send a message to the red coalition.

    - + + + + +
    ROUTEZONEACT_ROUTE + +
    ACT_ROUTE_ZONE
    -

    Type ROUTEZONE

    +

    Type ACT_ROUTE

    - + - + - - - - - - - - - - - - - - - - - + - + - + - + - + + + + + + + + + + +
    ROUTEZONE.ClassNameACT_ROUTE.ClassName
    ROUTEZONE.DisplayCategoryACT_ROUTE.DisplayCount
    ROUTEZONE.DisplayCount - -
    ROUTEZONE.DisplayInterval - -
    ROUTEZONE.DisplayMessage - -
    ROUTEZONE.DisplayTime - -
    ROUTEZONE:New(Task, Unit, ProcessUnit, TargetZone)ACT_ROUTE:New()

    Creates a new routing state machine.

    ROUTEZONE.ProcessUnitACT_ROUTE.ProcessUnit
    ROUTEZONE.TASKACT_ROUTE.TASK
    ROUTEZONE.TargetZoneACT_ROUTE.TargetZone
    ROUTEZONE:onleaveUnArrived(ProcessUnit, Event, From, To)ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To)

    StateMachine callback function

    +
    ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) +

    StateMachine callback function

    +
    ACT_ROUTE:onfuncHasArrived(ProcessUnit) +

    Check if the controllable has arrived.

    +
    + +

    Type ACT_ROUTE_ZONE

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ACT_ROUTE_ZONE.ClassName + +
    ACT_ROUTE_ZONE.DisplayCount + +
    ACT_ROUTE_ZONE.DisplayInterval + +
    ACT_ROUTE_ZONE.DisplayMessage + +
    ACT_ROUTE_ZONE.DisplayTime + +
    ACT_ROUTE_ZONE:Init(FsmRoute) + +
    ACT_ROUTE_ZONE:New(TargetZone) +

    Creates a new routing state machine.

    +
    ACT_ROUTE_ZONE.ProcessUnit + +
    ACT_ROUTE_ZONE.TASK + +
    ACT_ROUTE_ZONE.TargetZone + +
    ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) +

    StateMachine callback function

    +
    ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) +

    Method override to check if the controllable has arrived.

    @@ -221,9 +324,23 @@ There are 2 moments when state transition functions will be called by the state
    - #ROUTEZONE - -ROUTEZONE + #ACT_ROUTE + +ACT_ROUTE + +
    +
    + + + +
    +
    +
    +
    + + #ACT_ROUTE_ZONE + +ACT_ROUTE_ZONE
    @@ -234,48 +351,17 @@ There are 2 moments when state transition functions will be called by the state

    Type Route

    -

    Type ROUTEZONE

    +

    Type ACT_ROUTE

    -

    ROUTEZONE class

    +

    ACT_ROUTE class

    Field(s)

    #string - -ROUTEZONE.ClassName - -
    -
    - - - -
    -
    -
    -
    - - #string - -ROUTEZONE.DisplayCategory - -
    -
    - - - - -

    Route is the default display category

    - -
    -
    -
    -
    - - #number - -ROUTEZONE.DisplayCount + +ACT_ROUTE.ClassName
    @@ -288,8 +374,8 @@ There are 2 moments when state transition functions will be called by the state
    #number - -ROUTEZONE.DisplayInterval + +ACT_ROUTE.DisplayCount
    @@ -301,39 +387,8 @@ There are 2 moments when state transition functions will be called by the state
    - #boolean - -ROUTEZONE.DisplayMessage - -
    -
    - - - -
    -
    -
    -
    - - #number - -ROUTEZONE.DisplayTime - -
    -
    - - - - -

    10 seconds is the default

    - -
    -
    -
    -
    - - -ROUTEZONE:New(Task, Unit, ProcessUnit, TargetZone) + +ACT_ROUTE:New()
    @@ -341,34 +396,11 @@ There are 2 moments when state transition functions will be called by the state

    Creates a new routing state machine.

    -

    The task will route a CLIENT to a ZONE until the CLIENT is within that ZONE.

    +

    The process will route a CLIENT to a ZONE until the CLIENT is within that ZONE.

    -

    Parameters

    -
      -
    • - -

      Task#TASK Task :

      - -
    • -
    • - -

      Unit#UNIT Unit :

      - -
    • -
    • - -

      ProcessUnit :

      - -
    • -
    • - -

      TargetZone :

      - -
    • -

    Return value

    -

    #ROUTEZONE: +

    #ACT_ROUTE: self

    @@ -376,9 +408,9 @@ self

    - Unit#UNIT - -ROUTEZONE.ProcessUnit + Wrapper.Unit#UNIT + +ACT_ROUTE.ProcessUnit
    @@ -390,9 +422,9 @@ self

    - Task#TASK - -ROUTEZONE.TASK + Tasking.Task#TASK + +ACT_ROUTE.TASK
    @@ -404,9 +436,9 @@ self

    - Zone#ZONE_BASE - -ROUTEZONE.TargetZone + Core.Zone#ZONE_BASE + +ACT_ROUTE.TargetZone
    @@ -418,8 +450,8 @@ self

    - -ROUTEZONE:onleaveUnArrived(ProcessUnit, Event, From, To) + +ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To)
    @@ -430,7 +462,7 @@ self

    +
    +
    +
    +
    + + +ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) + +
    +
    + +

    StateMachine callback function

    + +

    Parameters

    + +
    +
    +
    +
    + + +ACT_ROUTE:onfuncHasArrived(ProcessUnit) + +
    +
    + +

    Check if the controllable has arrived.

    + +

    Parameter

    + +

    Return value

    + +

    #boolean:

    + + +
    +
    + +

    Type ACT_ROUTE_ZONE

    + +

    ACTROUTEZONE class

    + +

    Field(s)

    +
    +
    + + #string + +ACT_ROUTE_ZONE.ClassName + +
    +
    + + + +
    +
    +
    +
    + + #number + +ACT_ROUTE_ZONE.DisplayCount + +
    +
    + + + +
    +
    +
    +
    + + #number + +ACT_ROUTE_ZONE.DisplayInterval + +
    +
    + + + +
    +
    +
    +
    + + #boolean + +ACT_ROUTE_ZONE.DisplayMessage + +
    +
    + + + +
    +
    +
    +
    + + #number + +ACT_ROUTE_ZONE.DisplayTime + +
    +
    + + + + +

    10 seconds is the default

    + +
    +
    +
    +
    + + +ACT_ROUTE_ZONE:Init(FsmRoute) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      FsmRoute :

      + +
    • +
    +
    +
    +
    +
    + + +ACT_ROUTE_ZONE:New(TargetZone) + +
    +
    + +

    Creates a new routing state machine.

    + + +

    The task will route a controllable to a ZONE until the controllable is within that ZONE.

    + +

    Parameter

    + +
    +
    +
    +
    + + Wrapper.Unit#UNIT + +ACT_ROUTE_ZONE.ProcessUnit + +
    +
    + + + +
    +
    +
    +
    + + Tasking.Task#TASK + +ACT_ROUTE_ZONE.TASK + +
    +
    + + + +
    +
    +
    +
    + + Core.Zone#ZONE_BASE + +ACT_ROUTE_ZONE.TargetZone + +
    +
    + + + +
    +
    +
    +
    + + +ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) + +
    +
    + +

    StateMachine callback function

    + +

    Parameters

    + +
    +
    +
    +
    + + +ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) + +
    +
    + +

    Method override to check if the controllable has arrived.

    + +

    Parameter

    + +

    Return value

    + +

    #boolean:

    + +
    diff --git a/Moose Training/Documentation/ScheduleDispatcher.html b/Moose Training/Documentation/ScheduleDispatcher.html new file mode 100644 index 000000000..4bf4c0e56 --- /dev/null +++ b/Moose Training/Documentation/ScheduleDispatcher.html @@ -0,0 +1,449 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module ScheduleDispatcher

    + +

    This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

    + + + +
    + +

    Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.

    + +

    This class is tricky and needs some thorought explanation. +SCHEDULE classes are used to schedule functions for objects, or as persistent objects. +The SCHEDULEDISPATCHER class ensures that:

    + +
      +
    • Scheduled functions are planned according the SCHEDULER object parameters.
    • +
    • Scheduled functions are repeated when requested, according the SCHEDULER object parameters.
    • +
    • Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.
    • +
    + +

    The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection: + - When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER

    +
    object is _persistent_ within memory.
    +
    +

    - When a SCHEDULER object is attached to another object, then the SCHEDULER object is not persistent within memory after a garbage collection! +The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected. +Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
    +these will not be executed anymore when the SCHEDULER object has been destroyed.

    + +

    The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object. +The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER. +The SCHEDULER object plans new scheduled functions through the Core.Scheduler#SCHEDULER.Schedule() method. +The Schedule() method returns the CallID that is the reference ID for each planned schedule.

    + +
    + +
    + +

    Contributions: -

    +

    Authors: FlightControl : Design & Programming

    + + +

    Global(s)

    + + + + + +
    SCHEDULEDISPATCHER + +
    +

    Type SCHEDULEDISPATCHER

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) +

    Add a Schedule to the ScheduleDispatcher.

    +
    SCHEDULEDISPATCHER.CallID + +
    SCHEDULEDISPATCHER.ClassName + +
    SCHEDULEDISPATCHER:New() + +
    SCHEDULEDISPATCHER.ObjectSchedulers + +
    SCHEDULEDISPATCHER.PersistentSchedulers + +
    SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) + +
    SCHEDULEDISPATCHER.Schedule + +
    SCHEDULEDISPATCHER:Start(Scheduler, CallID) + +
    SCHEDULEDISPATCHER:Stop(Scheduler, CallID) + +
    + +

    Global(s)

    +
    +
    + + #SCHEDULEDISPATCHER + +SCHEDULEDISPATCHER + +
    +
    + + + +
    +
    +

    Type ScheduleDispatcher

    + +

    Type SCHEDULEDISPATCHER

    + +

    The SCHEDULEDISPATCHER structure

    + +

    Field(s)

    +
    +
    + + +SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) + +
    +
    + +

    Add a Schedule to the ScheduleDispatcher.

    + + +

    The development of this method was really tidy. +It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified. +Nothing of this code should be modified without testing it thoroughly.

    + +

    Parameters

    +
      +
    • + +

      Core.Scheduler#SCHEDULER Scheduler :

      + +
    • +
    • + +

      ScheduleFunction :

      + +
    • +
    • + +

      ScheduleArguments :

      + +
    • +
    • + +

      Start :

      + +
    • +
    • + +

      Repeat :

      + +
    • +
    • + +

      Randomize :

      + +
    • +
    • + +

      Stop :

      + +
    • +
    +
    +
    +
    +
    + + +SCHEDULEDISPATCHER.CallID + +
    +
    + + + +
    +
    +
    +
    + + #string + +SCHEDULEDISPATCHER.ClassName + +
    +
    + + + +
    +
    +
    +
    + + +SCHEDULEDISPATCHER:New() + +
    +
    + + + +
    +
    +
    +
    + + +SCHEDULEDISPATCHER.ObjectSchedulers + +
    +
    + + + + +

    Initialize the ObjectSchedulers array, which is a weakly coupled table. + If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

    + +
    +
    +
    +
    + + +SCHEDULEDISPATCHER.PersistentSchedulers + +
    +
    + + + + +

    Initialize the ObjectSchedulers array, which is a weakly coupled table. + If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

    + +
    +
    +
    +
    + + +SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      Scheduler :

      + +
    • +
    • + +

      CallID :

      + +
    • +
    +
    +
    +
    +
    + + +SCHEDULEDISPATCHER.Schedule + +
    +
    + + + +
    +
    +
    +
    + + +SCHEDULEDISPATCHER:Start(Scheduler, CallID) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      Scheduler :

      + +
    • +
    • + +

      CallID :

      + +
    • +
    +
    +
    +
    +
    + + +SCHEDULEDISPATCHER:Stop(Scheduler, CallID) + +
    +
    + + + +

    Parameters

    +
      +
    • + +

      Scheduler :

      + +
    • +
    • + +

      CallID :

      + +
    • +
    +
    +
    + +
    + +
    + + diff --git a/Moose Training/Documentation/Scheduler.html b/Moose Training/Documentation/Scheduler.html index 6ea2906a8..79b753d32 100644 --- a/Moose Training/Documentation/Scheduler.html +++ b/Moose Training/Documentation/Scheduler.html @@ -17,7 +17,7 @@ index
    @@ -87,33 +89,40 @@ -

    1) Scheduler#SCHEDULER class, extends Base#BASE

    -

    The Scheduler#SCHEDULER class models time events calling given event handling functions.

    +

    1) Core.Scheduler#SCHEDULER class, extends Core.Base#BASE

    + +

    The Core.Scheduler#SCHEDULER class creates schedule.

    1.1) SCHEDULER constructor

    -

    The SCHEDULER class is quite easy to use:

    + +

    The SCHEDULER class is quite easy to use, but note that the New constructor has variable parameters:

      -
    • Scheduler#SCHEDULER.New: Setup a new scheduler and start it with the specified parameters.
    • +
    • Core.Scheduler#SCHEDULER.New( nil ): Setup a new SCHEDULER object, which is persistently executed after garbage collection.
    • +
    • Core.Scheduler#SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
    • +
    • Core.Scheduler#SCHEDULER.New( nil, Function, FunctionArguments, Start, ... ): Setup a new persistent SCHEDULER object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
    • +
    • Core.Scheduler#SCHEDULER.New( Object, Function, FunctionArguments, Start, ... ): Setup a new SCHEDULER object, linked to Object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
    -

    1.2) SCHEDULER timer stop and start

    +

    1.2) SCHEDULER timer stopping and (re-)starting.

    +

    The SCHEDULER can be stopped and restarted with the following methods:

    -

    1.3) Reschedule new time event

    -

    With Scheduler#SCHEDULER.Schedule a new time event can be scheduled.

    +

    1.3) Create a new schedule

    + +

    With Core.Scheduler#SCHEDULER.Schedule() a new time event can be scheduled. This function is used by the :New() constructor when a new schedule is planned.


    Contributions:

      -
    • Mechanist : Concept & Testing
    • +
    • FlightControl : Concept & Testing

    Authors:

    @@ -122,6 +131,12 @@
  • FlightControl : Design & Programming
  • +

    Test Missions:

    + +
      +
    • SCH - Scheduler
    • +
    +
    @@ -143,31 +158,19 @@ - SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds) + SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop)

    SCHEDULER constructor.

    - SCHEDULER.RandomizationFactor + SCHEDULER:Remove(ScheduleID) - +

    Removes a specific schedule if a valid ScheduleID is provided.

    - SCHEDULER.Repeat - - - - - - SCHEDULER.RepeatSecondsInterval - - - - - - SCHEDULER:Schedule(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds) + SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop)

    Schedule a new time event.

    @@ -179,57 +182,27 @@ - SCHEDULER:Start() - -

    (Re-)Starts the scheduler.

    - - - - SCHEDULER.StartSeconds + SCHEDULER.SchedulerObject - SCHEDULER.StartTime + SCHEDULER.Schedules - SCHEDULER:Stop() + SCHEDULER:Start(ScheduleID) -

    Stops the scheduler.

    +

    (Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

    - SCHEDULER.StopSeconds + SCHEDULER:Stop(ScheduleID) - - - - - SCHEDULER.TimeEventFunction - - - - - - SCHEDULER.TimeEventFunctionArguments - - - - - - SCHEDULER.TimeEventObject - - - - - - SCHEDULER:_Scheduler() - - +

    Stops the schedules or a specific schedule if a valid ScheduleID is provided.

    @@ -274,7 +247,7 @@
    -SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds) +SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop)
    @@ -285,99 +258,91 @@
    • -

      #table TimeEventObject : +

      #table SchedulerObject : Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    • -

      #function TimeEventFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in TimeEventFunctionArguments.

      +

      #function SchedulerFunction : +The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    • -

      #table TimeEventFunctionArguments : +

      #table SchedulerArguments : Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    • -

      #number StartSeconds : +

      #number Start : Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    • -

      #number RepeatSecondsInterval : +

      #number Repeat : Specifies the interval in seconds when the scheduler will call the event function.

    • -

      #number RandomizationFactor : -Specifies a randomization factor between 0 and 1 to randomize the RepeatSecondsInterval.

      +

      #number RandomizeFactor : +Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    • -

      #number StopSeconds : +

      #number Stop : Specifies the amount of seconds when the scheduler will be stopped.

    -

    Return value

    +

    Return values

    +
      +
    1. #SCHEDULER: self

      +
    2. +
    3. + +

      #number: +The ScheduleID of the planned schedule.

      + +
    4. +
    - -SCHEDULER.RandomizationFactor - -
    -
    - - - -
    -
    -
    -
    - - #boolean - -SCHEDULER.Repeat - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULER.RepeatSecondsInterval + +SCHEDULER:Remove(ScheduleID)
    +

    Removes a specific schedule if a valid ScheduleID is provided.

    +

    Parameter

    +
      +
    • + +

      #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

      +
    • +
    -SCHEDULER:Schedule(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds) +SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop)
    @@ -391,51 +356,51 @@ self

    • -

      #table TimeEventObject : +

      #table SchedulerObject : Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    • -

      #function TimeEventFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in TimeEventFunctionArguments.

      +

      #function SchedulerFunction : +The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    • -

      #table TimeEventFunctionArguments : +

      #table SchedulerArguments : Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    • -

      #number StartSeconds : +

      #number Start : Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    • -

      #number RepeatSecondsInterval : +

      #number Repeat : Specifies the interval in seconds when the scheduler will call the event function.

    • -

      #number RandomizationFactor : -Specifies a randomization factor between 0 and 1 to randomize the RepeatSecondsInterval.

      +

      #number RandomizeFactor : +Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    • -

      #number StopSeconds : +

      #number Stop : Specifies the amount of seconds when the scheduler will be stopped.

    Return value

    -

    #SCHEDULER: -self

    +

    #number: +The ScheduleID of the planned schedule.

    @@ -451,139 +416,78 @@ self

    the ID of the scheduler.

    +
    +
    +
    +
    + + + +SCHEDULER.SchedulerObject + +
    +
    + + + +
    +
    +
    +
    + + + +SCHEDULER.Schedules + +
    +
    + + +
    -SCHEDULER:Start() +SCHEDULER:Start(ScheduleID)
    -

    (Re-)Starts the scheduler.

    +

    (Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

    -

    Return value

    +

    Parameter

    +
    -
    -
    -
    - - - -SCHEDULER.StartSeconds - -
    -
    - - - -
    -
    -
    -
    - - - -SCHEDULER.StartTime - -
    -
    - - +

    #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

    + +
    -SCHEDULER:Stop() +SCHEDULER:Stop(ScheduleID)
    -

    Stops the scheduler.

    +

    Stops the schedules or a specific schedule if a valid ScheduleID is provided.

    -

    Return value

    +

    Parameter

    +
    -
    -
    -
    - - - -SCHEDULER.StopSeconds - -
    -
    - - - -
    -
    -
    -
    - - - -SCHEDULER.TimeEventFunction - -
    -
    - - - -
    -
    -
    -
    - - - -SCHEDULER.TimeEventFunctionArguments - -
    -
    - - - -
    -
    -
    -
    - - - -SCHEDULER.TimeEventObject - -
    -
    - - - -
    -
    -
    -
    - - -SCHEDULER:_Scheduler() - -
    -
    - - +

    #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

    + +
    diff --git a/Moose Training/Documentation/Scoring.html b/Moose Training/Documentation/Scoring.html index f96f573a5..5cdd4d7a0 100644 --- a/Moose Training/Documentation/Scoring.html +++ b/Moose Training/Documentation/Scoring.html @@ -17,7 +17,7 @@ index
    @@ -680,12 +682,12 @@ self

    diff --git a/Moose Training/Documentation/Set.html b/Moose Training/Documentation/Set.html index a0445b1c8..770681900 100644 --- a/Moose Training/Documentation/Set.html +++ b/Moose Training/Documentation/Set.html @@ -17,7 +17,7 @@ index
    @@ -89,24 +91,24 @@
    -

    1) Set#SET_BASE class, extends Base#BASE

    -

    The Set#SET_BASE class defines the core functions that define a collection of objects. +

    1) Core.Set#SET_BASE class, extends Core.Base#BASE

    +

    The Core.Set#SET_BASE class defines the core functions that define a collection of objects. A SET provides iterators to iterate the SET, but will temporarily yield the ForEach interator loop at defined "intervals" to the mail simulator loop. In this way, large loops can be done while not blocking the simulator main processing loop. The default "yield interval" is after 10 objects processed. The default "time interval" is after 0.001 seconds.

    1.1) Add or remove objects from the SET

    -

    Some key core functions are Set#SET_BASE.Add and Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

    +

    Some key core functions are Core.Set#SET_BASE.Add and Core.Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

    1.2) Define the SET iterator "yield interval" and the "time interval"

    -

    Modify the iterator intervals with the Set#SET_BASE.SetInteratorIntervals method. +

    Modify the iterator intervals with the Core.Set#SET_BASE.SetInteratorIntervals method. You can set the "yield interval", and the "time interval". (See above).


    -

    2) Set#SET_GROUP class, extends Set#SET_BASE

    -

    Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

    +

    2) Core.Set#SET_GROUP class, extends Core.Set#SET_BASE

    +

    Mission designers can use the Core.Set#SET_GROUP class to build sets of groups belonging to certain:

    2.2) Add or Remove GROUP(s) from SET_GROUP:

    -

    GROUPS can be added and removed using the Set#SET_GROUP.AddGroupsByName and Set#SET_GROUP.RemoveGroupsByName respectively. +

    GROUPS can be added and removed using the Core.Set#SET_GROUP.AddGroupsByName and Core.Set#SET_GROUP.RemoveGroupsByName respectively. These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_GROUP.

    2.3) SET_GROUP filter criteria:

    @@ -146,7 +148,7 @@ Filter criteria are defined by:

    Planned filter criteria within development are (so these are not yet available):

    2.4) SET_GROUP iterators:

    @@ -163,8 +165,8 @@ The following iterator methods are currently available within the SETGROUP:
    -

    3) Set#SET_UNIT class, extends Set#SET_BASE

    -

    Mission designers can use the Set#SET_UNIT class to build sets of units belonging to certain:

    +

    3) Core.Set#SET_UNIT class, extends Core.Set#SET_BASE

    +

    Mission designers can use the Core.Set#SET_UNIT class to build sets of units belonging to certain:

    • Coalitions
    • @@ -182,7 +184,7 @@ The following iterator methods are currently available within the SETGROUP:

    3.2) Add or Remove UNIT(s) from SET_UNIT:

    -

    UNITs can be added and removed using the Set#SET_UNIT.AddUnitsByName and Set#SET_UNIT.RemoveUnitsByName respectively. +

    UNITs can be added and removed using the Core.Set#SET_UNIT.AddUnitsByName and Core.Set#SET_UNIT.RemoveUnitsByName respectively. These methods take a single UNIT name or an array of UNIT names to be added or removed from SET_UNIT.

    3.3) SET_UNIT filter criteria:

    @@ -206,7 +208,7 @@ Filter criteria are defined by:

    Planned filter criteria within development are (so these are not yet available):

    3.4) SET_UNIT iterators:

    @@ -230,8 +232,8 @@ The following iterator methods are currently available within the SETUNIT:<
    -

    4) Set#SET_CLIENT class, extends Set#SET_BASE

    -

    Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

    +

    4) Core.Set#SET_CLIENT class, extends Core.Set#SET_BASE

    +

    Mission designers can use the Core.Set#SET_CLIENT class to build sets of units belonging to certain:

    • Coalitions
    • @@ -249,7 +251,7 @@ The following iterator methods are currently available within the SETUNIT:<

    4.2) Add or Remove CLIENT(s) from SET_CLIENT:

    -

    CLIENTs can be added and removed using the Set#SET_CLIENT.AddClientsByName and Set#SET_CLIENT.RemoveClientsByName respectively. +

    CLIENTs can be added and removed using the Core.Set#SET_CLIENT.AddClientsByName and Core.Set#SET_CLIENT.RemoveClientsByName respectively. These methods take a single CLIENT name or an array of CLIENT names to be added or removed from SET_CLIENT.

    4.3) SET_CLIENT filter criteria:

    @@ -273,7 +275,7 @@ Filter criteria are defined by:

    Planned filter criteria within development are (so these are not yet available):

    4.4) SET_CLIENT iterators:

    @@ -287,8 +289,8 @@ The following iterator methods are currently available within the SETCLIENT
    -

    5) Set#SET_AIRBASE class, extends Set#SET_BASE

    -

    Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

    +

    5) Core.Set#SET_AIRBASE class, extends Core.Set#SET_BASE

    +

    Mission designers can use the Core.Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

    • Coalitions
    • @@ -302,7 +304,7 @@ The following iterator methods are currently available within the SETCLIENT

    5.2) Add or Remove AIRBASEs from SET_AIRBASE

    -

    AIRBASEs can be added and removed using the Set#SET_AIRBASE.AddAirbasesByName and Set#SET_AIRBASE.RemoveAirbasesByName respectively. +

    AIRBASEs can be added and removed using the Core.Set#SET_AIRBASE.AddAirbasesByName and Core.Set#SET_AIRBASE.RemoveAirbasesByName respectively. These methods take a single AIRBASE name or an array of AIRBASE names to be added or removed from SET_AIRBASE.

    5.3) SET_AIRBASE filter criteria

    @@ -444,7 +446,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) -

    Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

    +

    Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#POINT_VEC2.

    @@ -478,13 +480,13 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:Add(ObjectName, Object) -

    Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

    +

    Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using a given ObjectName as the index.

    SET_BASE:AddObject(Object) -

    Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

    +

    Adds a Core.Base#BASE object in the Core.Set#SET_BASE, using the Object Name as the index.

    @@ -496,7 +498,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:Count() -

    Retrieves the amount of objects in the Set#SET_BASE and derived classes.

    +

    Retrieves the amount of objects in the Core.Set#SET_BASE and derived classes.

    @@ -526,7 +528,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:FindNearestObjectFromPointVec2(PointVec2) -

    Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

    +

    Iterate the SET_BASE while identifying the nearest object from a Core.Point#POINT_VEC2.

    @@ -544,7 +546,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:Get(ObjectName) -

    Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    +

    Gets a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

    @@ -574,7 +576,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:Remove(ObjectName) -

    Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

    +

    Removes a Core.Base#BASE object from the Core.Set#SET_BASE and derived classes, based on the Object Name.

    @@ -640,7 +642,7 @@ The following iterator methods are currently available within the SETAIRBAS SET_BASE:_Find(ObjectName) -

    Finds an Base#BASE object based on the object Name.

    +

    Finds an Core.Base#BASE object based on the object Name.

    @@ -1194,7 +1196,7 @@ A single name or an array of AIRBASE names.

    @@ -1370,7 +1372,7 @@ self

    Return value

    -

    Airbase#AIRBASE: +

    Wrapper.Airbase#AIRBASE: The found Airbase.

    @@ -1393,7 +1395,7 @@ The found Airbase.

    @@ -1423,21 +1425,21 @@ The AIRBASE

    -

    Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

    +

    Iterate the SET_AIRBASE while identifying the nearest Wrapper.Airbase#AIRBASE from a Core.Point#POINT_VEC2.

    Parameter

    Return value

    -

    Airbase#AIRBASE: -The closest Airbase#AIRBASE.

    +

    Wrapper.Airbase#AIRBASE: +The closest Wrapper.Airbase#AIRBASE.

    @@ -1488,7 +1490,7 @@ self

    @@ -1536,7 +1538,7 @@ DatabaseSet = SET_AIRBASE:New()
    @@ -87,7 +89,7 @@ -

    1) Spawn#SPAWN class, extends 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.

    @@ -946,7 +948,7 @@ A coding example is provided at the description of the Group#GROUP, #number: +

    Wrapper.Group#GROUP, #number: The Group object found, the new Index where the group was found.

    @@ -993,7 +995,7 @@ The index of the group to return.

    Return value

    -

    Group#GROUP: +

    Wrapper.Group#GROUP: self

    @@ -1013,7 +1015,7 @@ self

    1. -

      Group#GROUP, #number: +

      Wrapper.Group#GROUP, #number: The last alive Group object found, the last Index where the last alive Group object was found.

    2. @@ -1057,7 +1059,7 @@ A Index holding the start position to search from. This method can also be used
      1. -

        Group#GROUP, #number: +

        Wrapper.Group#GROUP, #number: The next alive Group object found, the next Index where the next alive Group object was found.

      2. @@ -1361,13 +1363,13 @@ If true, SPAWN will perform the randomization of the UNIT
      3. -

        DCSTypes#Distance OuterRadius : +

        Dcs.DCSTypes#Distance OuterRadius : (optional) The outer radius in meters where the new group will be spawned.

      4. -

        DCSTypes#Distance InnerRadius : +

        Dcs.DCSTypes#Distance InnerRadius : (optional) The inner radius in meters where the new group will NOT be spawned.

      5. @@ -1618,7 +1620,7 @@ Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter

        The provided method will be called when a new group is spawned, including its given parameters. -The first parameter of the SpawnFunction is the Group#GROUP that was spawned.

        +The first parameter of the SpawnFunction is the Wrapper.Group#GROUP that was spawned.

        Parameters

          @@ -1684,7 +1686,7 @@ The index of the group to be spawned.

        Return value

        -

        Group#GROUP: +

        Wrapper.Group#GROUP: The group that was spawned. You can use this group for further actions.

        @@ -1747,7 +1749,7 @@ The group that was spawned. You can use this group for further actions.

        Return value

        -

        Group#GROUP: +

        Wrapper.Group#GROUP: The group that was spawned. You can use this group for further actions.

        @@ -1830,7 +1832,7 @@ You can use the returned group to further define the route to be followed.

    @@ -87,10 +89,10 @@ -

    1) Static#STATIC class, extends Positionable#POSITIONABLE

    +

    1) Wrapper.Static#STATIC class, extends Wrapper.Positionable#POSITIONABLE

    Statics are Static Units defined within the Mission Editor. Note that Statics are almost the same as Units, but they don't have a controller. -The Static#STATIC class is a wrapper class to handle the DCS Static objects:

    +The Wrapper.Static#STATIC class is a wrapper class to handle the DCS Static objects:

    diff --git a/Moose Training/Documentation/TASK.html b/Moose Training/Documentation/TASK.html index 7b091b9fd..0aba94927 100644 --- a/Moose Training/Documentation/TASK.html +++ b/Moose Training/Documentation/TASK.html @@ -17,7 +17,7 @@ index

    Module Task

    -

    This module contains the TASK_BASE class.

    +

    This module contains the TASK class.

    -

    1) #TASK_BASE class, extends Base#BASE

    -

    1.1) The #TASK_BASE class implements the methods for task orchestration within MOOSE.

    +

    1) #TASK class, extends Core.Base#BASE

    +

    1.1) The #TASK class implements the methods for task orchestration within MOOSE.

    The class provides a couple of methods to:

    1.2) Set and enquire task status (beyond the task state machine processing).

    @@ -126,7 +128,7 @@ The status of tasks can be enquired by the methods IsState foll

    1.3) Add scoring when reaching a certain task status:

    Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. -Use the method TASK_BASE.AddScore() to add scores when a status is reached.

    +Use the method TASK.AddScore() to add scores when a status is reached.

    1.4) Task briefing:

    A task briefing can be given that is shown to the player when he is assigned to the task.

    @@ -139,456 +141,552 @@ Use the method TASK_BASE.AddScore() to add

    Global(s)

    - + + + + +
    TASK_BASEPlayerNameText + +
    TASK
    -

    Type TASK_BASE

    +

    Type TASK

    - + - + - - - - - + - + - + + + + + - - - - - - - - - + - + - + + + + + + + + + + + + + + + + + - + + + + + - + + + + + - + - + - + - + - + - + + + + + + + + + + + + + - + - + - + - + - + - + - + + + + + - + - + - + - + + + + + - + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - + - - - - - + - + - + - + - + + + + + + + + + - + - - - - - + - + - - - - - + - + - - - - - + - + + + + + + + + + - + + + + + - + + + + + - + - + - + - + - + - + + + + + - + - + - + - + - - - - - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + +
    TASK_BASE:AddProcess(TaskUnit, Process)TASK:Abort() -

    Add Process to Task with key Unit.

    +

    FSM Abort synchronous event function for TASK.

    TASK_BASE:AddScore(TaskStatus, ScoreText, Score)TASK:AbortUnit(PlayerUnit) -

    Adds a score for the TASK to be achieved.

    +

    Abort a PlayerUnit from a Task.

    TASK_BASE:AddStateMachine(TaskUnit, Fsm) -

    Add a FiniteStateMachine to Task with key Unit

    -
    TASK_BASE:AssignToGroup(TaskGroup)TASK:AssignToGroup(TaskGroup)

    Assign the Taskto a Group.

    TASK_BASE:AssignToUnit(TaskUnit)TASK:AssignToUnit(TaskUnit) -

    Assign the Taskto an alive Unit.

    +

    Assign the Task to an alive Unit.

    TASK_BASE.ClassNameTASK:Cancel() +

    FSM Cancel synchronous event function for TASK.

    +
    TASK.ClassName
    TASK_BASE:CleanUp() -

    Cleans all references of a TASK_BASE.

    -
    TASK_BASE:FailProcesses(TaskUnitName) -

    Fail processes from Task with key Unit

    -
    TASK_BASE.FsmTASK.CommandCenter
    TASK_BASE:GetCategory()TASK:CrashUnit(PlayerUnit) -

    Gets the Category of the Task

    +

    A PlayerUnit crashed in a Task.

    TASK_BASE:GetID()TASK:Fail() +

    FSM Fail synchronous event function for TASK.

    +
    TASK:FailProcesses(TaskUnitName) + +
    TASK.FsmTemplate + +
    TASK:GetGroups() +

    Gets the SET_GROUP assigned to the TASK.

    +
    TASK:GetID()

    Gets the ID of the Task

    TASK_BASE:GetName()TASK:GetMission() +

    Gets the Mission to where the TASK belongs.

    +
    TASK:GetName()

    Gets the Name of the Task

    TASK_BASE:GetScoring()TASK:GetProcessTemplate(ProcessName) +

    Get the default or currently assigned Process template with key ProcessName.

    +
    TASK:GetScoring()

    Gets the Scoring of the task

    TASK_BASE:GetStateString()TASK:GetStateString()

    Gets the Task status.

    TASK_BASE:GetTaskIndex()TASK:GetTaskIndex() -

    Gets the Task Index, which is a combination of the Task category, the Task type, the Task name.

    +

    Gets the Task Index, which is a combination of the Task type, the Task name.

    TASK_BASE:GetTaskName()TASK:GetTaskName()

    Returns the Task name.

    TASK_BASE:GetType()TASK:GetType()

    Gets the Type of the Task

    TASK_BASE:HasStateMachine(TaskUnitName)TASK:GetUnitProcess() -

    Checks if there is a FiniteStateMachine assigned to Unit for Task

    +

    Get the Task FSM Process Template

    TASK_BASE:IsAssignedToGroup(TaskGroup)TASK:HasAliveUnits() +

    Returns if the Task has still alive and assigned Units.

    +
    TASK:HasGroup(FindGroup) + +
    TASK:HasStateMachine(TaskUnit) +

    Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

    +
    TASK:IsAssignedToGroup(TaskGroup)

    Returns if the Task is assigned to the Group.

    TASK_BASE:IsStateAssigned()TASK:IsStateAssigned()

    Is the Task status Assigned.

    TASK_BASE:IsStateFailed()TASK:IsStateFailed()

    Is the Task status Failed.

    TASK_BASE:IsStateHold()TASK:IsStateHold()

    Is the Task status Hold.

    TASK_BASE:IsStatePlanned()TASK:IsStatePlanned()

    Is the Task status Planned.

    TASK_BASE:IsStateReplanned()TASK:IsStateReplanned()

    Is the Task status Replanned.

    TASK_BASE:IsStateSuccess()TASK:IsStateSuccess()

    Is the Task status Success.

    TASK_BASE.MenuTASK:JoinUnit(PlayerUnit) +

    Add a PlayerUnit to join the Task.

    +
    TASK.Menu
    TASK_BASE.MenuAbortTASK.MenuAssignToGroup(MenuParam)
    TASK_BASE.MenuAssignToGroup(MenuParam)TASK.MenuTaskAbort(MenuParam)
    TASK_BASE.MenuStatusTASK.MenuTaskStatus(MenuParam)
    TASK_BASE.MenuTaskAbort(MenuParam)TASK:MessageToGroups(Message) +

    Send a message of the Task to the assigned Groups.

    +
    TASK.Mission
    TASK_BASE.MenuTaskStatus(MenuParam)TASK:New(Mission, SetGroupAssign, TaskName, TaskType) +

    Instantiates a new TASK.

    +
    TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) +

    FSM PlayerAborted event handler prototype for TASK.

    +
    TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) +

    FSM PlayerCrashed event handler prototype for TASK.

    +
    TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) +

    FSM PlayerDead event handler prototype for TASK.

    +
    TASK.Players
    TASK_BASE.MissionTASK.ProcessClasses
    TASK_BASE:New(The, SetGroup, TaskName, TaskType, TaskCategory, Mission) -

    Instantiates a new TASK_BASE.

    -
    TASK_BASE:OnAssigned(TaskUnit, Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_BASE:OnFailed(TaskUnit, Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_BASE:OnStateChange(TaskUnit, Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_BASE:OnSuccess(TaskUnit, Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_BASE.PlayersTASK.Processes
    TASK_BASE.Processes - -
    TASK_BASE:RemoveMenu()TASK:RemoveMenu()

    Remove the menu options of the Task to all the groups in the SetGroup.

    TASK_BASE:RemoveMenuForGroup(TaskGroup)TASK:RemoveMenuForGroup(TaskGroup)

    Remove the menu option of the Task for a Group.

    TASK_BASE:RemoveProcesses(TaskUnitName)TASK:RemoveStateMachine(TaskUnit) -

    Remove Processes from Task with key Unit

    +

    Remove FiniteStateMachines from Task with key TaskUnit

    TASK_BASE:RemoveStateMachines(TaskUnitName)TASK:Replan() -

    Remove FiniteStateMachines from Task with key Unit

    +

    FSM Replan synchronous event function for TASK.

    TASK_BASE.ScoresTASK:ReportDetails() +

    Create a detailed report of the Task.

    +
    TASK:ReportSummary() +

    Create a summary report of the Task.

    +
    TASK.Scores
    TASK_BASE:SendBriefingToAssignedGroups()TASK:SendBriefingToAssignedGroups()

    Send the briefng message of the Task to the assigned Groups.

    TASK_BASE:SetAssignedMenu() -

    Set the menu options of the Task to all the groups in the SetGroup.

    -
    TASK_BASE:SetAssignedMenuForGroup(TaskGroup)TASK:SetAssignedMenuForGroup(TaskGroup)

    Set the assigned menu options of the Task.

    TASK_BASE:SetBriefing(TaskBriefing)TASK:SetBriefing(TaskBriefing)

    Sets a Task briefing.

    TASK_BASE:SetCategory(TaskCategory) -

    Sets the Category of the Task

    -
    TASK_BASE.SetGroupTASK.SetGroup

    The Set of Groups assigned to the Task

    TASK_BASE:SetID(TaskID)TASK:SetID(TaskID)

    Sets the ID of the Task

    TASK_BASE:SetName(TaskName) -

    Sets the Name of the Task

    -
    TASK_BASE:SetPlannedMenu()TASK:SetMenu()

    Set the menu options of the Task to all the groups in the SetGroup.

    TASK_BASE:SetPlannedMenuForGroup(TaskGroup, MenuText)TASK:SetMenuForGroup(TaskGroup) +

    Set the Menu for a Group

    +
    TASK:SetName(TaskName) +

    Sets the Name of the Task

    +
    TASK:SetPlannedMenuForGroup(TaskGroup, MenuText)

    Set the planned menu option of the Task.

    TASK_BASE:SetType(TaskType)TASK:SetStateMachine(TaskUnit, Fsm) +

    Add a FiniteStateMachine to Task with key TaskUnit

    +
    TASK:SetType(TaskType)

    Sets the Type of the Task

    TASK_BASE:StateAssigned()TASK:SetUnitProcess(Core, FsmTemplate) +

    Sets the Task FSM Process Template

    +
    TASK:StateAssigned()

    Sets a Task to status Assigned.

    TASK_BASE:StateFailed()TASK:StateFailed()

    Sets a Task to status Failed.

    TASK_BASE:StateHold()TASK:StateHold()

    Sets a Task to status Hold.

    TASK_BASE:StatePlanned()TASK:StatePlanned()

    Sets a Task to status Planned.

    TASK_BASE:StateReplanned()TASK:StateReplanned()

    Sets a Task to status Replanned.

    TASK_BASE:StateSuccess()TASK:StateSuccess()

    Sets a Task to status Success.

    TASK_BASE.TaskBriefingTASK:Success() +

    FSM Success synchronous event function for TASK.

    +
    TASK.TaskBriefing
    TASK_BASE.TaskCategoryTASK.TaskID
    TASK_BASE.TaskIDTASK.TaskName
    TASK_BASE.TaskNameTASK.TaskScheduler
    TASK_BASE.TaskSchedulerTASK.TaskType
    TASK_BASE.TaskType - -
    TASK_BASE:UnAssignFromGroups()TASK:UnAssignFromGroups()

    Assign the Task from the Groups.

    TASK_BASE:UnAssignFromUnit(TaskUnit, TaskUnitName)TASK:UnAssignFromUnit(TaskUnit)

    UnAssign the Task from an alive Unit.

    TASK_BASE:_EventAssignUnit(Event)TASK:__Abort() -

    Register a potential new assignment for a new spawned Unit.

    +

    FSM Abort asynchronous event function for TASK.

    TASK_BASE:_EventDead(Event)TASK:__Cancel() -

    UnAssigns a Unit that is left by a player, crashed, dead, ....

    +

    FSM Cancel asynchronous event function for TASK.

    TASK_BASE:_EventPlayerLeaveUnit(Event)TASK:__Fail() -

    Catches the "player leave unit" event for a Unit ....

    +

    FSM Fail asynchronous event function for TASK.

    TASK_BASE:_Schedule()TASK:__Replan() - +

    FSM Replan asynchronous event function for TASK.

    TASK_BASE:_Scheduler()TASK:__Success() - +

    FSM Success asynchronous event function for TASK.

    +
    TASK:onenterAborted(Event, From, To) +

    FSM function for a TASK

    +
    TASK:onenterAssigned(Event, From, To) +

    FSM function for a TASK

    +
    TASK:onenterFailed(Event, From, To) +

    FSM function for a TASK

    +
    TASK:onenterSuccess(Event, From, To) +

    FSM function for a TASK

    +
    TASK:onstatechange(Event, From, To) +

    FSM function for a TASK

    @@ -597,9 +695,23 @@ Use the method TASK_BASE.AddScore() to add
    - #TASK_BASE - -TASK_BASE + + +PlayerNameText + +
    +
    + + + +
    +
    +
    +
    + + #TASK + +TASK
    @@ -610,117 +722,63 @@ Use the method TASK_BASE.AddScore() to add

    Type Task

    -

    Type TASK_BASE

    +

    Type TASK

    -

    The TASK_BASE class

    +

    The TASK class

    Field(s)

    - -TASK_BASE:AddProcess(TaskUnit, Process) + +TASK:Abort()
    -

    Add Process to Task with key Unit.

    +

    FSM Abort synchronous event function for TASK.

    -

    Parameters

    -
      -
    • - -

      Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      Process :

      - -
    • -
    -

    Return value

    - -

    Process#PROCESS: -The process that was added.

    + +

    Use this event to Abort the Task.

    - -TASK_BASE:AddScore(TaskStatus, ScoreText, Score) + +TASK:AbortUnit(PlayerUnit)
    -

    Adds a score for the TASK to be achieved.

    +

    Abort a PlayerUnit from a Task.

    -

    Parameters

    + +

    If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

    + +

    Parameter

    • -

      #string TaskStatus : -is the status of the TASK when the score needs to be given.

      - -
    • -
    • - -

      #string ScoreText : -is a text describing the score that is given according the status.

      - -
    • -
    • - -

      #number Score : -is a number providing the score of the status.

      +

      Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player aborting the Task.

    Return value

    -

    #TASK_BASE: -self

    +

    #boolean: +true if Unit is part of the Task.

    - -TASK_BASE:AddStateMachine(TaskUnit, Fsm) - -
    -
    - -

    Add a FiniteStateMachine to Task with key Unit

    - -

    Parameters

    -
      -
    • - -

      Unit#UNIT TaskUnit :

      - -
    • -
    • - -

      Fsm :

      - -
    • -
    -

    Return value

    - -

    #TASK_BASE: -self

    - -
    -
    -
    -
    - - -TASK_BASE:AssignToGroup(TaskGroup) + +TASK:AssignToGroup(TaskGroup)
    @@ -731,44 +789,65 @@ self

    -
    -
    -
    -
    - - -TASK_BASE:AssignToUnit(TaskUnit) - -
    -
    - -

    Assign the Taskto an alive Unit.

    - -

    Parameter

    -

    Return value

    -

    #TASK_BASE: +

    #TASK:

    + + +
    +
    +
    +
    + + +TASK:AssignToUnit(TaskUnit) + +
    +
    + +

    Assign the Task to an alive Unit.

    + +

    Parameter

    + +

    Return value

    + +

    #TASK: self

    +
    +
    +
    +
    + + +TASK:Cancel() + +
    +
    + +

    FSM Cancel synchronous event function for TASK.

    + + +

    Use this event to Cancel the Task.

    +
    #string - -TASK_BASE.ClassName + +TASK.ClassName
    @@ -780,17 +859,13 @@ self

    - -TASK_BASE:CleanUp() + Tasking.CommandCenter#COMMANDCENTER + +TASK.CommandCenter
    -

    Cleans all references of a TASK_BASE.

    - -

    Return value

    - -

    #nil:

    @@ -798,35 +873,85 @@ self

    - -TASK_BASE:FailProcesses(TaskUnitName) + +TASK:CrashUnit(PlayerUnit)
    -

    Fail processes from Task with key Unit

    +

    A PlayerUnit crashed in a Task.

    + + +

    Abort the Player. +If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

    Parameter

    • -

      #string TaskUnitName :

      +

      Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player aborting the Task.

    Return value

    -

    #TASK_BASE: -self

    +

    #boolean: +true if Unit is part of the Task.

    - StateMachine#STATEMACHINE - -TASK_BASE.Fsm + +TASK:Fail() + +
    +
    + +

    FSM Fail synchronous event function for TASK.

    + + +

    Use this event to Fail the Task.

    + +
    +
    +
    +
    + + +TASK:FailProcesses(TaskUnitName) + +
    +
    + + + + +

    TODO: Obscolete? +- Fail processes from Task with key Unit + @param #TASK self + @param #string TaskUnitName + @return #TASK self

    + +

    Parameter

    +
      +
    • + +

      TaskUnitName :

      + +
    • +
    +
    +
    +
    +
    + + Core.Fsm#FSM_PROCESS + +TASK.FsmTemplate
    @@ -838,26 +963,26 @@ self

    - -TASK_BASE:GetCategory() + +TASK:GetGroups()
    -

    Gets the Category of the Task

    +

    Gets the SET_GROUP assigned to the TASK.

    Return value

    -

    #string: -TaskCategory

    +

    Core.Set#SET_GROUP:

    +
    - -TASK_BASE:GetID() + +TASK:GetID()
    @@ -874,8 +999,26 @@ TaskID

    - -TASK_BASE:GetName() + +TASK:GetMission() + +
    +
    + +

    Gets the Mission to where the TASK belongs.

    + +

    Return value

    + +

    Tasking.Mission#MISSION:

    + + +
    +
    +
    +
    + + +TASK:GetName()
    @@ -892,8 +1035,34 @@ The Task Name

    - -TASK_BASE:GetScoring() + +TASK:GetProcessTemplate(ProcessName) + +
    +
    + +

    Get the default or currently assigned Process template with key ProcessName.

    + +

    Parameter

    +
      +
    • + +

      #string ProcessName :

      + +
    • +
    +

    Return value

    + +

    Core.Fsm#FSM_PROCESS:

    + + +
    +
    +
    +
    + + +TASK:GetScoring()
    @@ -902,7 +1071,7 @@ The Task Name

    Return value

    -

    Scoring#SCORING: +

    Functional.Scoring#SCORING: Scoring

    @@ -910,8 +1079,8 @@ Scoring

    - -TASK_BASE:GetStateString() + +TASK:GetStateString()
    @@ -923,13 +1092,13 @@ Scoring

    - -TASK_BASE:GetTaskIndex() + +TASK:GetTaskIndex()
    -

    Gets the Task Index, which is a combination of the Task category, the Task type, the Task name.

    +

    Gets the Task Index, which is a combination of the Task type, the Task name.

    Return value

    @@ -941,8 +1110,8 @@ The Task ID

    - -TASK_BASE:GetTaskName() + +TASK:GetTaskName()
    @@ -959,8 +1128,8 @@ TaskName

    - -TASK_BASE:GetType() + +TASK:GetType()
    @@ -977,45 +1146,55 @@ TaskType

    - -TASK_BASE:HasStateMachine(TaskUnitName) + +TASK:GetUnitProcess()
    -

    Checks if there is a FiniteStateMachine assigned to Unit for Task

    +

    Get the Task FSM Process Template

    -

    Parameter

    -
      -
    • - -

      #string TaskUnitName :

      - -
    • -

    Return value

    -

    #TASK_BASE: -self

    +

    Core.Fsm#FSM_PROCESS:

    +
    - -TASK_BASE:IsAssignedToGroup(TaskGroup) + +TASK:HasAliveUnits()
    -

    Returns if the Task is assigned to the Group.

    +

    Returns if the Task has still alive and assigned Units.

    + +

    Return value

    + +

    #boolean:

    + + +
    +
    +
    +
    + + +TASK:HasGroup(FindGroup) + +
    +
    + +

    Parameter

    @@ -1029,8 +1208,60 @@ self

    - -TASK_BASE:IsStateAssigned() + +TASK:HasStateMachine(TaskUnit) + +
    +
    + +

    Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

    + +

    Parameter

    + +

    Return value

    + +

    #TASK: +self

    + +
    +
    +
    +
    + + +TASK:IsAssignedToGroup(TaskGroup) + +
    +
    + +

    Returns if the Task is assigned to the Group.

    + +

    Parameter

    + +

    Return value

    + +

    #boolean:

    + + +
    +
    +
    +
    + + +TASK:IsStateAssigned()
    @@ -1042,8 +1273,8 @@ self

    - -TASK_BASE:IsStateFailed() + +TASK:IsStateFailed()
    @@ -1055,8 +1286,8 @@ self

    - -TASK_BASE:IsStateHold() + +TASK:IsStateHold()
    @@ -1068,8 +1299,8 @@ self

    - -TASK_BASE:IsStatePlanned() + +TASK:IsStatePlanned()
    @@ -1081,8 +1312,8 @@ self

    - -TASK_BASE:IsStateReplanned() + +TASK:IsStateReplanned()
    @@ -1094,8 +1325,8 @@ self

    - -TASK_BASE:IsStateSuccess() + +TASK:IsStateSuccess()
    @@ -1107,8 +1338,41 @@ self

    - -TASK_BASE.Menu + +TASK:JoinUnit(PlayerUnit) + +
    +
    + +

    Add a PlayerUnit to join the Task.

    + + +

    For each Group within the Task, the Unit is check if it can join the Task. +If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

    + +

    Parameter

    +
      +
    • + +

      Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player joining the Mission.

      + +
    • +
    +

    Return value

    + +

    #boolean: +true if Unit is part of the Task.

    + +
    +
    +
    +
    + + + +TASK.Menu
    @@ -1120,21 +1384,8 @@ self

    - -TASK_BASE.MenuAbort - -
    -
    - - - -
    -
    -
    -
    - - -TASK_BASE.MenuAssignToGroup(MenuParam) + +TASK.MenuAssignToGroup(MenuParam)
    @@ -1154,21 +1405,8 @@ self

    - -TASK_BASE.MenuStatus - -
    -
    - - - -
    -
    -
    -
    - - -TASK_BASE.MenuTaskAbort(MenuParam) + +TASK.MenuTaskAbort(MenuParam)
    @@ -1188,8 +1426,8 @@ self

    - -TASK_BASE.MenuTaskStatus(MenuParam) + +TASK.MenuTaskStatus(MenuParam)
    @@ -1209,9 +1447,30 @@ self

    - Mission#MISSION - -TASK_BASE.Mission + +TASK:MessageToGroups(Message) + +
    +
    + +

    Send a message of the Task to the assigned Groups.

    + +

    Parameter

    +
      +
    • + +

      Message :

      + +
    • +
    +
    +
    +
    +
    + + Tasking.Mission#MISSION + +TASK.Mission
    @@ -1223,13 +1482,13 @@ self

    - -TASK_BASE:New(The, SetGroup, TaskName, TaskType, TaskCategory, Mission) + +TASK:New(Mission, SetGroupAssign, TaskName, TaskType)
    -

    Instantiates a new TASK_BASE.

    +

    Instantiates a new TASK.

    Should never be used. Interface Class.

    @@ -1238,13 +1497,13 @@ self

    • -

      Mission#MISSION The : -mission wherein the Task is registered.

      +

      Tasking.Mission#MISSION Mission : +The mission wherein the Task is registered.

    • -

      Set#SET_GROUP SetGroup : +

      Core.Set#SET_GROUP SetGroupAssign : The set of groups for which the Task can be assigned.

    • @@ -1259,22 +1518,11 @@ The name of the Task

      #string TaskType : The type of the Task

      - -
    • - -

      #string TaskCategory : -The category of the Task (A2G, A2A, Transport, ... )

      - -
    • -
    • - -

      Mission :

      -

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1282,44 +1530,26 @@ self

    - -TASK_BASE:OnAssigned(TaskUnit, Fsm, Event, From, To, Event) + +TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName)
    -

    StateMachine callback function for a TASK

    +

    FSM PlayerAborted event handler prototype for TASK.

    Parameters

    @@ -1328,44 +1558,26 @@ self

    - -TASK_BASE:OnFailed(TaskUnit, Fsm, Event, From, To, Event) + +TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName)
    -

    StateMachine callback function for a TASK

    +

    FSM PlayerCrashed event handler prototype for TASK.

    Parameters

    @@ -1374,44 +1586,26 @@ self

    - -TASK_BASE:OnStateChange(TaskUnit, Fsm, Event, From, To, Event) + +TASK:OnAfterPlayerDead(PlayerUnit, PlayerName)
    -

    StateMachine callback function for a TASK

    +

    FSM PlayerDead event handler prototype for TASK.

    Parameters

    @@ -1420,54 +1614,8 @@ self

    - -TASK_BASE:OnSuccess(TaskUnit, Fsm, Event, From, To, Event) - -
    -
    - -

    StateMachine callback function for a TASK

    - -

    Parameters

    - -
    -
    -
    -
    - - -TASK_BASE.Players + +TASK.Players
    @@ -1479,8 +1627,9 @@ self

    - -TASK_BASE.Processes + + +TASK.ProcessClasses
    @@ -1492,8 +1641,22 @@ self

    - -TASK_BASE:RemoveMenu() + + +TASK.Processes + +
    +
    + + + +
    +
    +
    +
    + + +TASK:RemoveMenu()
    @@ -1502,7 +1665,7 @@ self

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1510,8 +1673,8 @@ self

    - -TASK_BASE:RemoveMenuForGroup(TaskGroup) + +TASK:RemoveMenuForGroup(TaskGroup)
    @@ -1522,13 +1685,13 @@ self

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1536,25 +1699,25 @@ self

    - -TASK_BASE:RemoveProcesses(TaskUnitName) + +TASK:RemoveStateMachine(TaskUnit)
    -

    Remove Processes from Task with key Unit

    +

    Remove FiniteStateMachines from Task with key TaskUnit

    Parameter

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1562,26 +1725,58 @@ self

    - -TASK_BASE:RemoveStateMachines(TaskUnitName) + +TASK:Replan()
    -

    Remove FiniteStateMachines from Task with key Unit

    +

    FSM Replan synchronous event function for TASK.

    -

    Parameter

    -
      -
    • - -

      #string TaskUnitName :

      + +

      Use this event to Replan the Task.

      + +
    +
    +
    +
    + + +TASK:ReportDetails() + +
    +
    + +

    Create a detailed report of the Task.

    + + +

    List the Task Status, and the Players assigned to the Task.

    - -

    Return value

    -

    #TASK_BASE: -self

    +

    #string:

    + + +
    +
    +
    +
    + + +TASK:ReportSummary() + +
    +
    + +

    Create a summary report of the Task.

    + + +

    List the Task Name and Status

    + +

    Return value

    + +

    #string:

    +
    @@ -1589,8 +1784,8 @@ self

    - -TASK_BASE.Scores + +TASK.Scores
    @@ -1602,8 +1797,8 @@ self

    - -TASK_BASE:SendBriefingToAssignedGroups() + +TASK:SendBriefingToAssignedGroups()
    @@ -1615,26 +1810,8 @@ self

    - -TASK_BASE:SetAssignedMenu() - -
    -
    - -

    Set the menu options of the Task to all the groups in the SetGroup.

    - -

    Return value

    - -

    #TASK_BASE: -self

    - -
    -
    -
    -
    - - -TASK_BASE:SetAssignedMenuForGroup(TaskGroup) + +TASK:SetAssignedMenuForGroup(TaskGroup)
    @@ -1645,13 +1822,13 @@ self

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1659,8 +1836,8 @@ self

    - -TASK_BASE:SetBriefing(TaskBriefing) + +TASK:SetBriefing(TaskBriefing)
    @@ -1677,7 +1854,7 @@ self

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1685,30 +1862,9 @@ self

    - -TASK_BASE:SetCategory(TaskCategory) - -
    -
    - -

    Sets the Category of the Task

    - -

    Parameter

    -
      -
    • - -

      #string TaskCategory :

      - -
    • -
    -
    -
    -
    -
    - - Set#SET_GROUP - -TASK_BASE.SetGroup + Core.Set#SET_GROUP + +TASK.SetGroup
    @@ -1720,8 +1876,8 @@ self

    - -TASK_BASE:SetID(TaskID) + +TASK:SetID(TaskID)
    @@ -1741,8 +1897,42 @@ self

    - -TASK_BASE:SetName(TaskName) + +TASK:SetMenu() + +
    +
    + +

    Set the menu options of the Task to all the groups in the SetGroup.

    + +
    +
    +
    +
    + + +TASK:SetMenuForGroup(TaskGroup) + +
    +
    + +

    Set the Menu for a Group

    + +

    Parameter

    +
      +
    • + +

      TaskGroup :

      + +
    • +
    +
    +
    +
    +
    + + +TASK:SetName(TaskName)
    @@ -1762,26 +1952,8 @@ self

    - -TASK_BASE:SetPlannedMenu() - -
    -
    - -

    Set the menu options of the Task to all the groups in the SetGroup.

    - -

    Return value

    - -

    #TASK_BASE: -self

    - -
    -
    -
    -
    - - -TASK_BASE:SetPlannedMenuForGroup(TaskGroup, MenuText) + +TASK:SetPlannedMenuForGroup(TaskGroup, MenuText)
    @@ -1792,7 +1964,7 @@ self

    Return value

    -

    #TASK_BASE: +

    #TASK: self

    @@ -1812,8 +1984,39 @@ self

    - -TASK_BASE:SetType(TaskType) + +TASK:SetStateMachine(TaskUnit, Fsm) + +
    +
    + +

    Add a FiniteStateMachine to Task with key TaskUnit

    + +

    Parameters

    + +

    Return value

    + +

    #TASK: +self

    + +
    +
    +
    +
    + + +TASK:SetType(TaskType)
    @@ -1833,8 +2036,35 @@ self

    - -TASK_BASE:StateAssigned() + +TASK:SetUnitProcess(Core, FsmTemplate) + +
    +
    + +

    Sets the Task FSM Process Template

    + +

    Parameters

    +
      +
    • + +

      Core : +Fsm#FSM_PROCESS

      + +
    • +
    • + +

      FsmTemplate :

      + +
    • +
    +
    +
    +
    +
    + + +TASK:StateAssigned()
    @@ -1846,8 +2076,8 @@ self

    - -TASK_BASE:StateFailed() + +TASK:StateFailed()
    @@ -1859,8 +2089,8 @@ self

    - -TASK_BASE:StateHold() + +TASK:StateHold()
    @@ -1872,8 +2102,8 @@ self

    - -TASK_BASE:StatePlanned() + +TASK:StatePlanned()
    @@ -1885,8 +2115,8 @@ self

    - -TASK_BASE:StateReplanned() + +TASK:StateReplanned()
    @@ -1898,22 +2128,38 @@ self

    - -TASK_BASE:StateSuccess() + +TASK:StateSuccess()

    Sets a Task to status Success.

    +
    +
    +
    +
    + + +TASK:Success() + +
    +
    + +

    FSM Success synchronous event function for TASK.

    + + +

    Use this event to make the Task a Success.

    +
    - -TASK_BASE.TaskBriefing + +TASK.TaskBriefing
    @@ -1926,8 +2172,8 @@ self

    - -TASK_BASE.TaskCategory + +TASK.TaskID
    @@ -1940,8 +2186,22 @@ self

    - -TASK_BASE.TaskID + +TASK.TaskName + +
    +
    + + + +
    +
    +
    +
    + + Core.Scheduler#SCHEDULER + +TASK.TaskScheduler
    @@ -1954,8 +2214,8 @@ self

    - -TASK_BASE.TaskName + +TASK.TaskType
    @@ -1967,36 +2227,8 @@ self

    - Scheduler#SCHEDULER - -TASK_BASE.TaskScheduler - -
    -
    - - - -
    -
    -
    -
    - - - -TASK_BASE.TaskType - -
    -
    - - - -
    -
    -
    -
    - - -TASK_BASE:UnAssignFromGroups() + +TASK:UnAssignFromGroups()
    @@ -2008,151 +2240,262 @@ self

    - -TASK_BASE:UnAssignFromUnit(TaskUnit, TaskUnitName) + +TASK:UnAssignFromUnit(TaskUnit)

    UnAssign the Task from an alive Unit.

    +

    Parameter

    + +

    Return value

    + +

    #TASK: +self

    + +
    +
    +
    +
    + + +TASK:__Abort() + +
    +
    + +

    FSM Abort asynchronous event function for TASK.

    + + +

    Use this event to Abort the Task.

    + +
    +
    +
    +
    + + +TASK:__Cancel() + +
    +
    + +

    FSM Cancel asynchronous event function for TASK.

    + + +

    Use this event to Cancel the Task.

    + +
    +
    +
    +
    + + +TASK:__Fail() + +
    +
    + +

    FSM Fail asynchronous event function for TASK.

    + + +

    Use this event to Fail the Task.

    + +
    +
    +
    +
    + + +TASK:__Replan() + +
    +
    + +

    FSM Replan asynchronous event function for TASK.

    + + +

    Use this event to Replan the Task.

    + +
    +
    +
    +
    + + +TASK:__Success() + +
    +
    + +

    FSM Success asynchronous event function for TASK.

    + + +

    Use this event to make the Task a Success.

    + +
    +
    +
    +
    + + +TASK:onenterAborted(Event, From, To) + +
    +
    + +

    FSM function for a TASK

    +

    Parameters

    • -

      Unit#UNIT TaskUnit :

      +

      #string Event :

    • -

      TaskUnitName :

      +

      #string From :

      + +
    • +
    • + +

      #string To :

    -

    Return value

    - -

    #TASK_BASE: -self

    -
    - -TASK_BASE:_EventAssignUnit(Event) + +TASK:onenterAssigned(Event, From, To)
    -

    Register a potential new assignment for a new spawned Unit.

    +

    FSM function for a TASK

    - -

    Tasks only get assigned if there are players in it.

    - -

    Parameter

    +

    Parameters

    • -

      Event#EVENTDATA Event :

      +

      #string Event :

      + +
    • +
    • + +

      #string From :

      + +
    • +
    • + +

      #string To :

    -

    Return value

    - -

    #TASK_BASE: -self

    -
    - -TASK_BASE:_EventDead(Event) + +TASK:onenterFailed(Event, From, To)
    -

    UnAssigns a Unit that is left by a player, crashed, dead, ....

    +

    FSM function for a TASK

    - -

    There are only assignments if there are players in it.

    - -

    Parameter

    +

    Parameters

    • -

      Event#EVENTDATA Event :

      +

      #string Event :

      + +
    • +
    • + +

      #string From :

      + +
    • +
    • + +

      #string To :

    -

    Return value

    - -

    #TASK_BASE: -self

    -
    - -TASK_BASE:_EventPlayerLeaveUnit(Event) + +TASK:onenterSuccess(Event, From, To)
    -

    Catches the "player leave unit" event for a Unit ....

    +

    FSM function for a TASK

    - -

    When a player is an air unit, and leaves the unit:

    - -
      -
    • and he is not at an airbase runway on the ground, he will fail its task.
    • -
    • and he is on an airbase and on the ground, the process for him will just continue to work, he can switch airplanes, and take-off again. - This is important to model the change from plane types for a player during mission assignment.
    • -
    - -

    Parameter

    +

    Parameters

    • -

      Event#EVENTDATA Event :

      +

      #string Event :

      + +
    • +
    • + +

      #string From :

      + +
    • +
    • + +

      #string To :

    -

    Return value

    +
    +
    +
    +
    + + +TASK:onstatechange(Event, From, To) + +
    +
    + +

    FSM function for a TASK

    + +

    Parameters

    +
    -
    -
    -
    - - -TASK_BASE:_Schedule() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_BASE:_Scheduler() - -
    -
    - + +
  • + +

    #string From :

    +
  • +
  • + +

    #string To :

    +
  • +
    diff --git a/Moose Training/Documentation/Task_A2G.html b/Moose Training/Documentation/Task_A2G.html index 7273829e6..9737bad70 100644 --- a/Moose Training/Documentation/Task_A2G.html +++ b/Moose Training/Documentation/Task_A2G.html @@ -17,7 +17,7 @@ index
    @@ -87,15 +89,15 @@ -

    1) #TASK_A2G class, extends Task#TASK_BASE

    +

    1) #TASK_A2G class, extends Tasking.Task#TASK

    The #TASK_A2G class defines a CAS or BAI task of a Set of Target Units, -located at a Target Zone, based on the tasking capabilities defined in Task#TASK_BASE. -The TASK_A2G is implemented using a Statemachine#STATEMACHINE_TASK, and has the following statuses:

    +located at a Target Zone, based on the tasking capabilities defined in Tasking.Task#TASK. +The TASK_A2G is implemented using a Statemachine#FSM_TASK, and has the following statuses:

    @@ -117,21 +119,9 @@ The TASK_A2G is implemented using a Type TASK_A2G - - - - - - - - @@ -144,30 +134,6 @@ The TASK_A2G is implemented using a TASK_A2G:New(Mission, SetGroup, TaskName, TaskType, UnitSetTargets, TargetZone, TargetSetUnit, FACUnit) - - - - - - - - - - - - - - - -
    TASK_A2G:AssignToUnit(TaskUnit) -

    Assign the Task to a Unit.

    -
    TASK_A2G.ClassName -
    TASK_A2G:CleanUp() -

    Removes a TASK_A2G.

    Instantiates a new TASK_A2G.

    -
    TASK_A2G:OnNext(Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    -
    TASK_A2G.TaskScheduler - -
    TASK_A2G:_Schedule() - -
    TASK_A2G:_Scheduler() -
    @@ -197,32 +163,6 @@ The TASK_A2G is implemented using a
    - -TASK_A2G:AssignToUnit(TaskUnit) - -
    -
    - -

    Assign the Task to a Unit.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK_A2G: -self

    - -
    - -
    -
    - #string TASK_A2G.ClassName @@ -232,24 +172,6 @@ self

    - -
    -
    -
    - - -TASK_A2G:CleanUp() - -
    -
    - -

    Removes a TASK_A2G.

    - -

    Return value

    - -

    #nil:

    - -
    @@ -280,7 +202,7 @@ self

    -
    -
    - - -TASK_A2G:OnNext(Fsm, Event, From, To, Event) - -
    -
    - -

    StateMachine callback function for a TASK

    - -

    Parameters

    - -
    -
    -
    -
    - - - -TASK_A2G.TaskScheduler - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:_Schedule() - -
    -
    - - - -
    -
    -
    -
    - - -TASK_A2G:_Scheduler() - -
    -
    - - -
    diff --git a/Moose Training/Documentation/Task_Client_Menu.html b/Moose Training/Documentation/Task_Client_Menu.html index 3d1bd3e84..5fd5fc3d4 100644 --- a/Moose Training/Documentation/Task_Client_Menu.html +++ b/Moose Training/Documentation/Task_Client_Menu.html @@ -17,7 +17,7 @@ index
    @@ -244,7 +246,7 @@
    - Menu#MENU_CLIENT_COMMAND + Core.Menu#MENU_CLIENT_COMMAND TASK2_MENU_CLIENT.MenuTask @@ -284,12 +286,12 @@
    @@ -87,15 +89,15 @@ -

    1) #TASK_PICKUP class, extends Task#TASK_BASE

    +

    1) #TASK_PICKUP class, extends Tasking.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_BASE. -The TASK_PICKUP is implemented using a Statemachine#STATEMACHINE_TASK, and has the following statuses:

    +based on the tasking capabilities defined in Tasking.Task#TASK. +The TASK_PICKUP is implemented using a Statemachine#FSM_TASK, and has the following statuses:

    @@ -209,7 +211,7 @@ The TASK_PICKUP is implemented using a Unit#UNIT TaskUnit :

    +

    Wrapper.Unit#UNIT TaskUnit :

    @@ -280,7 +282,7 @@ self

    @@ -334,7 +336,7 @@ self

    @@ -87,15 +89,15 @@ -

    1) #TASK_SEAD class, extends Task#TASK_BASE

    +

    1) #TASK_SEAD class, extends Tasking.Task#TASK

    The #TASK_SEAD class defines a SEAD task for a Set of Target Units, located at a Target Zone, -based on the tasking capabilities defined in Task#TASK_BASE. -The TASK_SEAD is implemented using a Statemachine#STATEMACHINE_TASK, and has the following statuses:

    +based on the tasking capabilities defined in Tasking.Task#TASK. +The TASK_SEAD is implemented using a Statemachine#FSM_TASK, and has the following statuses:

    @@ -117,21 +119,9 @@ The TASK_SEAD is implemented using a Type TASK_SEAD - - - - - - - - @@ -144,12 +134,6 @@ The TASK_SEAD is implemented using a TASK_SEAD:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetZone, TargetSetUnit) - - - - @@ -185,32 +169,6 @@ The TASK_SEAD is implemented using a
    - -TASK_SEAD:AssignToUnit(TaskUnit) - -
    -
    - -

    Assign the Task to a Unit.

    - -

    Parameter

    - -

    Return value

    - -

    #TASK_SEAD: -self

    - -
    - -
    -
    - #string TASK_SEAD.ClassName @@ -220,24 +178,6 @@ self

    - -
    -
    -
    - - -TASK_SEAD:CleanUp() - -
    -
    - -

    Removes a TASK_SEAD.

    - -

    Return value

    - -

    #nil:

    - -
    @@ -268,7 +208,7 @@ self

    -
    -
    - - -TASK_SEAD:OnNext(Fsm, Event, From, To, Event) - -
    -
    - -

    StateMachine callback function for a TASK

    - -

    Parameters

    -
    diff --git a/Moose Training/Documentation/Unit.html b/Moose Training/Documentation/Unit.html index 34dceef48..4f609ac2b 100644 --- a/Moose Training/Documentation/Unit.html +++ b/Moose Training/Documentation/Unit.html @@ -17,7 +17,7 @@ index
    @@ -87,8 +89,8 @@ -

    1) Unit#UNIT class, extends Controllable#CONTROLLABLE

    -

    The Unit#UNIT class is a wrapper class to handle the DCS Unit objects:

    +

    1) #UNIT class, extends Wrapper.Controllable#CONTROLLABLE

    +

    The #UNIT class is a wrapper class to handle the DCS Unit objects:

    • Support all DCS Unit APIs.
    • @@ -121,7 +123,7 @@ If the DCS Unit object does not exist or is nil, the UNIT methods will return ni

      1.2) DCS UNIT APIs

      The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method. To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call, -the first letter of the method is also capitalized. So, by example, the DCS Unit method DCSUnit#Unit.getName() +the first letter of the method is also capitalized. So, by example, the DCS Unit method Dcs.DCSWrapper.Unit#Unit.getName() is implemented in the UNIT class as UNIT.GetName().

      1.3) Smoke, Flare Units

      @@ -144,7 +146,7 @@ If you want to obtain the complete 3D position including ori�

      The UNIT class contains methods to test the location or proximity against zones or other objects.

      1.6.1) Zones

      -

      To test whether the Unit is within a zone, use the UNIT.IsInZone() or the UNIT.IsNotInZone() methods. Any zone can be tested on, but the zone must be derived from Zone#ZONE_BASE.

      +

      To test whether the Unit is within a zone, use the UNIT.IsInZone() or the UNIT.IsNotInZone() methods. Any zone can be tested on, but the zone must be derived from Core.Zone#ZONE_BASE.

      1.6.2) Units

      Test if another DCS Unit is within a given radius of the current DCS Unit, use the UNIT.OtherUnitInRadius() method.

      @@ -189,12 +191,6 @@ If you want to obtain the complete 3D position including ori�
    - - - - @@ -391,12 +387,6 @@ If you want to obtain the complete 3D position including ori� - - - - @@ -421,68 +411,6 @@ If you want to obtain the complete 3D position including ori� - -
    TASK_SEAD:AssignToUnit(TaskUnit) -

    Assign the Task to a Unit.

    -
    TASK_SEAD.ClassName -
    TASK_SEAD:CleanUp() -

    Removes a TASK_SEAD.

    Instantiates a new TASK_SEAD.

    -
    TASK_SEAD:OnNext(Fsm, Event, From, To, Event) -

    StateMachine callback function for a TASK

    UNIT:Flare(FlareColor)

    Signal a flare at the position of the UNIT.

    -
    UNIT.FlareColor -
    UNIT:SmokeBlue()

    Smoke the UNIT Blue.

    -
    UNIT.SmokeColor -
    UNIT:SmokeWhite()

    Smoke the UNIT White.

    -
    - -

    Type UNIT.FlareColor

    - - - - - - - - - - - - - - - - - -
    UNIT.FlareColor.Green - -
    UNIT.FlareColor.Red - -
    UNIT.FlareColor.White - -
    UNIT.FlareColor.Yellow - -
    - -

    Type UNIT.SmokeColor

    - - - - - - - - - - - - - - - - - - - -
    UNIT.SmokeColor.Blue - -
    UNIT.SmokeColor.Green - -
    UNIT.SmokeColor.Orange - -
    UNIT.SmokeColor.Red - -
    UNIT.SmokeColor.White -
    @@ -583,14 +511,14 @@ If you want to obtain the complete 3D position including ori�

    Return value

    -

    Unit#UNIT: +

    #UNIT: self

    @@ -617,7 +545,7 @@ The Unit Name.

    Return value

    -

    Unit#UNIT: +

    #UNIT: self

    @@ -637,24 +565,10 @@ self

    - - -
    -
    - - #UNIT.FlareColor - -UNIT.FlareColor - -
    -
    - - -
    @@ -724,7 +638,7 @@ self

    1. -

      DCSUnit#Unit.Ammo:

      +

      Dcs.DCSWrapper.Unit#Unit.Ammo:

    2. @@ -778,7 +692,7 @@ The DCS Unit is not existing or alive.

      Return value

      -

      DCSUnit#Unit:

      +

      Dcs.DCSWrapper.Unit#Unit:

      @@ -829,7 +743,7 @@ The DCS Unit is not existing or alive.

      1. -

        Group#GROUP: +

        Wrapper.Group#GROUP: The Group of the Unit.

      2. @@ -1025,7 +939,7 @@ The DCS Unit is not existing or alive.

      3. -

        DCSObject#Object: +

        Dcs.DCSWrapper.Object#Object: The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

      4. @@ -1053,7 +967,7 @@ The DCS Unit is not existing or alive.

        1. -

          DCSUnit#Unit.Sensors:

          +

          Dcs.DCSWrapper.Unit#Unit.Sensors:

        2. @@ -1271,7 +1185,7 @@ Ground category evaluation result.

    @@ -1298,7 +1212,7 @@ Returns true if the unit is within the Zone#ZON

    Module Zone

    -

    This module contains the ZONE classes, inherited from Zone#ZONE_BASE.

    +

    This module contains the ZONE classes, inherited from Core.Zone#ZONE_BASE.

    There are essentially two core functions that zones accomodate:

    @@ -97,7 +99,7 @@ -

    1.2) Each zone implements two polymorphic functions defined in Zone#ZONE_BASE:

    +

    1.2) Each zone implements two polymorphic functions defined in Core.Zone#ZONE_BASE:

    1.3) A zone has a probability factor that can be set to randomize a selection between zones:

    @@ -144,8 +146,8 @@

    1.4) A zone manages Vectors:

    1.5) A zone has a bounding square:

    @@ -163,11 +165,11 @@
    -

    2) Zone#ZONE_RADIUS class, extends Zone#ZONE_BASE

    +

    2) Core.Zone#ZONE_RADIUS class, extends Core.Zone#ZONE_BASE

    The ZONERADIUS class defined by a zone name, a location and a radius. -This class implements the inherited functions from Zone#ZONEBASE taking into account the own zone format and properties.

    +This class implements the inherited functions from Core.Zone#ZONEBASE taking into account the own zone format and properties.

    -

    2.1) Zone#ZONE_RADIUS constructor:

    +

    2.1) Core.Zone#ZONE_RADIUS constructor:

    diff --git a/Moose Training/Documentation/index.html b/Moose Training/Documentation/index.html index a6cf3cf7d..045f3eaf2 100644 --- a/Moose Training/Documentation/index.html +++ b/Moose Training/Documentation/index.html @@ -17,7 +17,7 @@ index

    Module

    - + @@ -135,6 +137,12 @@ + + + + @@ -231,12 +239,6 @@ - - - - @@ -248,7 +250,13 @@ + + + + @@ -315,12 +323,6 @@ - - - - @@ -336,15 +338,15 @@ - + - + @@ -372,15 +374,15 @@ - + - + @@ -398,7 +400,7 @@ @@ -429,12 +431,19 @@ + + + + @@ -447,6 +456,12 @@ + + + +
    AIBalancerAI_Balancer -

    This module contains the AIBALANCER class.

    +

    This module contains the AI_BALANCER class.

    Client

    This module contains the CLIENT class.

    +
    CommandCenter +

    A COMMANDCENTER is the owner of multiple missions within MOOSE.

    Detection

    This module contains the DETECTION classes.

    -
    DetectionManager -

    This module contains the DETECTION_MANAGER class and derived classes.

    Event -

    The EVENT class models an efficient event handling process between other classes and its units, weapons.

    +

    This module contains the EVENT class.

    +
    Fsm +

    This module contains the FSM class.

    Positionable

    This module contains the POSITIONABLE class.

    -
    Process -
    Process_SmokeRoute - +

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    RouteScheduleDispatcher -

    (SP) (MP) (FSM) Route AI or players to waypoints or zones.

    +

    This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

    SpawnSmoke -

    This module contains the SPAWN class.

    +

    (SP) (MP) (FSM) Route AI or players through waypoints or to zones.

    StateMachineSpawn -

    This module contains the STATEMACHINE class.

    +

    This module contains the SPAWN class.

    Task -

    This module contains the TASK_BASE class.

    +

    This module contains the TASK class.

    Unit

    This module contains the UNIT class.

    +
    Utils +

    This module contains derived utilities taken from the MIST framework, +which are excellent tools to be reused in an OO environment!.

    Zone -

    This module contains the ZONE classes, inherited from Zone#ZONE_BASE.

    +

    This module contains the ZONE classes, inherited from Core.Zone#ZONE_BASE.

    land +
    routines +

    Various routines

    diff --git a/Moose Training/Documentation/land.html b/Moose Training/Documentation/land.html index 17f1a7876..951505f35 100644 --- a/Moose Training/Documentation/land.html +++ b/Moose Training/Documentation/land.html @@ -17,7 +17,7 @@ index
    @@ -203,7 +205,7 @@ point on the ground.

    Return value

    -

    DCSTypes#Distance:

    +

    Dcs.DCSTypes#Distance:

    diff --git a/Moose Training/Documentation/routines.html b/Moose Training/Documentation/routines.html index 09c5cc167..11e68a822 100644 --- a/Moose Training/Documentation/routines.html +++ b/Moose Training/Documentation/routines.html @@ -17,13 +17,16 @@ index