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 @@
+
+
+
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:
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.
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.
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:
Assigned: The player is assigned to the task. This is the initialization state for the process.
@@ -133,34 +135,34 @@ There are two types of event methods, which you can use to influence the normal
(*) End states of the process.
-
ACCOUNT state transition functions:
+
ACT_ACCOUNT 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:
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
+ 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.
The ACCOUNT_DEADS class accounts (detects, counts and reports) successful kills of DCS units.
+
The ACTACCOUNTDEADS class accounts (detects, counts and reports) successful kills of DCS units.
The process is given a Set of units that will be tracked upon successful destruction.
The process will end after each target has been successfully destroyed.
Each successful dead will trigger an Account state transition that can be scored, modified or administered.
The AIRBASE class is a wrapper class to handle the DCS Airbase objects:
@@ -121,7 +123,7 @@ If the DCS Airbase object does not exist or is nil, the AIRBASE methods will ret
1.2) DCS AIRBASE APIs
The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method.
To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call,
-the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSAirbase#Airbase.getName()
+the first letter of the method is also capitalized. So, by example, the DCS Airbase method Dcs.DCSWrapper.Airbase#Airbase.getName()
is implemented in the AIRBASE class as AIRBASE.GetName().
More functions will be added
@@ -242,14 +244,14 @@ is implemented in the AIRBASE class as AIRBASE.Get
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
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:
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.
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:
Immediate: The event method has exactly the name of the event.
+
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.
-
1.2.2) ASSIGN_ACCEPT States:
+
ACT_ASSIGN States:
UnAssigned: The player has not accepted the task.
-
Assigned: The player has accepted the task.
+
Assigned (*): The player has accepted the task.
+
Rejected (*): The player has not accepted the task.
+
Waiting: The process is awaiting player feedback.
+
Failed (*): The process has failed.
-
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:
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
+ 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.
-
1.3) Manage the ASSIGN_ACCEPT parameters:
-
The following methods are available to modify the parameters of a ASSIGN_ACCEPT object:
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.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:
-
-
-
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
- If you want to change the behaviour of the AIControllable at this event, return false,
- but then you'll need to specify your own logic using the AIControllable!
-
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
-
-
-
1.3) Manage the ASSIGNMENUACCEPT parameters:
-
The following methods are available to modify the parameters of a ASSIGNMENUACCEPT object:
Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.
1.1) BASE constructor
-
Any class derived from BASE, must use the Base#BASE.New method how this is done.
+
Any class derived from BASE, must use the Core.Base#BASE.New method how this is done.
1.2) BASE Trace functionality
The BASE class contains trace methods to trace progress within a mission execution of a certain object.
@@ -226,6 +228,150 @@ 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.
-- This declares the constructor of the class TASK, inheriting from BASE.
---- TASK constructor
--- @param #TASK self
--- @param Parameter The parameter of the New constructor.
--- @return #TASK self
-function TASK:New( Parameter )
-
- local self = BASE:Inherit( self, BASE:New() )
-
- self.Variable = Parameter
-
- return self
-end
+
@todo need to investigate if the deepCopy is really needed... Don't think so.
@@ -1205,6 +1981,19 @@ BASE:TraceOn( true )
-- Switch the tracing Off
BASE:TraceOn( false )
+
+
+
TODO: Complete Dcs.DCSTypes#Event structure.
- The main event handling function... This function captures all events generated for the class.
@param #BASE self
- @param DCSTypes#Event event
+ @param Dcs.DCSTypes#Event event
Parameter
diff --git a/Moose Training/Documentation/CARGO.html b/Moose Training/Documentation/CARGO.html
index ec3814ef4..7aa7c873b 100644
--- a/Moose Training/Documentation/CARGO.html
+++ b/Moose Training/Documentation/CARGO.html
@@ -17,7 +17,7 @@
index
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.
+
AICARGOUNIT, 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.
+
AICARGOPACKAGE, 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.
+
AICARGOPACKAGE, 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.
-
CARGOGROUPED, represented by a Group of CARGOUNITs.
+
AICARGOGROUPED, represented by a Group of CARGO_UNITs.
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 CARGOBASE is a state machine: it manages the different events and states of the cargo.
-All derived classes from CARGOBASE follow the same state machine, expose the same cargo event functions, and provide the same cargo states.
+
The AICARGO is a state machine: it manages the different events and states of the cargo.
+All derived classes from AICARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.
CARBO_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) CARBO_BASE States:
+
1.2.2) AI_CARGO States:
UnLoaded: The cargo is unloaded from a carrier.
@@ -128,29 +130,29 @@ All derived classes from CARGOBASE follow the same state machine, expose th
End: The process has come to an end.
-
1.2.3) CARBO_BASE state transition functions:
+
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 functions will be called by the state machine:
+There are 2 moments when state transition methods will be called by the state machine:
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
+ 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
-
The CARGOUNIT 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 CARGOUNIT objects to and from carriers.
+
2) #AICARGOUNIT class
+
The AICARGOUNIT 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 AICARGOUNIT objects to and from carriers.
-
5) #CARGO_GROUPED class
-
The CARGOGROUPED 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 CARGOUNIT objects to and from carriers.
+
5) #AICARGOGROUPED class
+
The AICARGOGROUPED 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 AICARGOUNIT objects to and from carriers.
This module is still under construction, but is described above works already, and will keep working ...
@@ -158,7 +160,37 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the C
@@ -1315,8 +1277,8 @@ The cargo must be in the Loaded state.
-
Point#POINT_VEC2 ToPointVec2 :
-(optional) @{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.
+
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.
@@ -1325,8 +1287,8 @@ The cargo must be in the Loaded state.
@@ -1341,8 +1303,8 @@ The cargo must be in the Loaded state.
-
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.
@@ -1352,8 +1314,8 @@ The cargo must be in the Loaded state.
@@ -1451,8 +1413,8 @@ The amount of seconds to delay the action.
-
Point#POINT_VEC2 ToPointVec2 :
-(optional) @{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.
+
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.
@@ -1461,8 +1423,8 @@ The amount of seconds to delay the action.
@@ -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.
TODO check Dcs.DCSTypes#Weapon
- Destroys a missile from the simulator, but checks first if it is still existing!
@param #CLEANUP self
- @param DCSTypes#Weapon MissileObject
+ @param Dcs.DCSTypes#Weapon MissileObject
Parameter
@@ -398,13 +400,13 @@ The groupname...
-
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!
Clients are those Units defined within the Mission Editor that have the skillset defined as Client or Player.
Note that clients are NOT the same as Units, they are NOT necessarily alive.
-The Client#CLIENT class is a wrapper class to handle the DCS Unit objects that have the skillset defined as Client or Player:
+The Wrapper.Client#CLIENT class is a wrapper class to handle the DCS Unit objects that have the skillset defined as Client or Player:
Wraps the DCS Unit objects with skill level set to Player or Client.
@@ -226,7 +228,7 @@ If the DCS Unit object does not exist or is nil, the CLIENT methods will return
Several controllable task methods are available that help you to prepare tasks.
-These methods return a string consisting of the task description, which can then be given to either a Controllable#CONTROLLABLE.PushTask or Controllable#SetTask method to assign the task to the CONTROLLABLE.
+These methods return a string consisting of the task description, which can then be given to either a Wrapper.Controllable#CONTROLLABLE.PushTask or Wrapper.Controllable#SetTask method to assign the task to the CONTROLLABLE.
Tasks are specific for the category of the CONTROLLABLE, more specific, for AIR, GROUND or AIR and GROUND.
Each task description where applicable indicates for which controllable category the task is valid.
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.
@@ -270,7 +272,7 @@ This is different from the EnRoute tasks, where the targets of the task need to
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.
@@ -1033,13 +993,13 @@ All en-route tasks have the priority parameter. This is a number (less value - h
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.
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.
@@ -1052,7 +1012,7 @@ All en-route tasks have the priority parameter. This is a number (less value - h
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.
@@ -1141,7 +1101,7 @@ All en-route tasks have the priority parameter. This is a number (less value - h
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.
@@ -1160,7 +1120,7 @@ All en-route tasks have the priority parameter. This is a number (less value - h
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Dcs.DCSTypes#Vec3 Vec3 :
Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.
@@ -2630,7 +2359,7 @@ Maximal distance from escorted controllable to threat. If the threat is already
Dcs.DCSTypes#Vec3 Vec3 :
Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.
@@ -2772,7 +2501,7 @@ Detach waypoint of another controllable. Once reached the unit / controllable Fo
Use the method Wrapper.Controllable#CONTROLLABLE to define the hook functions for specific waypoints.
Use the method @{Controllable@CONTROLLABLE:WayPointExecute) to start the execution of the new mission plan.
Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!
@@ -3375,7 +3104,7 @@ If WayPoints is given, then use the route.
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).
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.
+
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
Dcs.DCSTypes#Distance Height :
Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
Dcs.DCSTypes#Time Seconds :
Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
@@ -1610,13 +1612,13 @@ TODO: Implement Seconds parameter. Challenge is to first develop the "continue f
Dcs.DCSTypes#Distance Height :
Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
Dcs.DCSTypes#Time Seconds :
Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
@@ -1682,7 +1684,7 @@ Note that if a report targets menu is not specified, no targets will be detected
Dcs.DCSTypes#Time Seconds :
Optional parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.
@@ -1733,13 +1735,13 @@ Optional parameter that lets the escort report their current detected targets af
Dcs.DCSTypes#Distance Height :
Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
Dcs.DCSTypes#Time Seconds :
Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
@@ -1822,13 +1824,13 @@ Optional parameter that shows the menu option text. If no text is given, the def
@@ -1327,8 +1351,8 @@ The function to be called when the event occurs for the unit.
-
Base#BASE EventSelf :
-The self instance of the class for which the event is.
+
Core.Base#BASE EventClass :
+The self instance of the class for which the event is captured. When the event happens, the event process will be called in this class provided.
@@ -1348,7 +1372,7 @@ The self instance of the class for which the event is.
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.
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.
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.
The Wrapper.Group#GROUP class is a wrapper class to handle the DCS Group objects:
Support all DCS Group APIs.
@@ -120,7 +122,7 @@ If the DCS Group object does not exist or is nil, the GROUP methods will return
1.2) GROUP task methods
Several group task methods are available that help you to prepare tasks.
These methods return a string consisting of the task description, which can then be given to either a
-Controllable#CONTROLLABLE.PushTask or Controllable#CONTROLLABLE.SetTask method to assign the task to the GROUP.
+Wrapper.Controllable#CONTROLLABLE.PushTask or Wrapper.Controllable#CONTROLLABLE.SetTask method to assign the task to the GROUP.
Tasks are specific for the category of the GROUP, more specific, for AIR, GROUND or AIR and GROUND.
Each task description where applicable indicates for which group category the task is valid.
There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.
@@ -133,28 +135,28 @@ This is different from the EnRoute tasks, where the targets of the task need to
Controllable#CONTROLLABLE.EnRouteTaskEngageGroup: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.
Controllable#CONTROLLABLE.EnRouteTaskFAC: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.
Wrapper.Controllable#CONTROLLABLE.EnRouteTaskEngageGroup: (AIR) Engaging a group. The task does not assign the target group to the unit/group to attack now; it just allows the unit/group to engage the target group as well as other assigned targets.
Wrapper.Controllable#CONTROLLABLE.EnRouteTaskFAC: (AIR + GROUND) The task makes the group/unit a FAC and lets the FAC to choose a targets (enemy ground group) around as well as other assigned targets.
#boolean:
-Returns true if the Group is completely within the Zone#ZONE_BASE
+Returns true if the Group is completely within the Core.Zone#ZONE_BASE
@@ -1312,7 +1314,7 @@ Returns true if the Group is completely within the Zone#ZONE_BASE Zone :
+
The template must be retrieved with the Wrapper.Group#GROUP.GetTemplate() function.
The template contains all the definitions as declared within the mission file.
To understand templates, do the following:
@@ -1428,7 +1430,7 @@ The template of the Group retrieved with GROUP:GetTemplate()
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 joining the Mission.
+
+
+
+
Return value
+
+
#boolean:
+true if Unit is part of a Task in 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" )
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.
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
Core.Menu#MENUCLIENTCOMMAND: Manages command menus for CLIENTs. This manages menus for units with the skill level "Client".
@@ -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.
-
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.
The Menu#MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
+
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.
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.
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.
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.
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.
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.
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
@@ -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
@@ -1371,7 +1451,7 @@ self
MenuStatus[MenuGroupName]:Remove()
end
- --- @param Group#GROUP MenuGroup
+ --- @param Wrapper.Group#GROUP MenuGroup
local function AddStatusMenu( MenuGroup )
local MenuGroupName = MenuGroup:GetName()
-- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
@@ -1413,6 +1493,76 @@ self
+
+
+
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.
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
The #AI_PATROLZONE class implements the core functions to patrol a Zone by an AIR ControllableGroup.
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.
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:
-
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 function can be used.
+
Patrol: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used.
RTB: The AIControllable reports it wants to return to the base.
Dead: The AIControllable is dead ...
End: The process has come to an end.
-
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:
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
+ 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 )
@@ -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:
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.
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.
Parameters
@@ -460,7 +462,7 @@ The amount of seconds the out of fuel AIControllable will orbit before returning
-- 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 )
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
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.
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:
POINT_VEC2.New(): a 2D point, taking an additional height parameter.
Dcs.DCSTypes#Distance LandHeightAdd :
(optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.
The #ROUTEZONE class implements the core functions to route an AIR Controllable player Unit to a Zone.
-The player receives on perioding times messages with the coordinates of the route to follow.
-Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.
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.
Start: The process is started. The process will go into the Report state.
+
Report: The process is reporting to the player the route to be followed.
+
Route: The process is routing the controllable.
+
Pause: The process is pausing the route of the controllable.
+
Arrive: The controllable has arrived at a route point.
+
More: There are more route points that need to be followed. The process will go back into the Report state.
+
NoMore: There are no more route points that need to be followed. The process will go into the Success state.
-
1.2) ROUTEZONE state machine:
-
The ROUTEZONE is a state machine: it manages the different events and states of the Controllable it is controlling.
+
ACT_ROUTE Event methods:
-
1.2.1) ROUTEZONE 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:
-
ROUTEZONE.Start( Controllable ): Start the route to the zone. Messages will appear within defined intervals.
+
Immediate: The event method has exactly the name of the event.
+
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.
-
1.2.2) ROUTEZONE States:
+
ACT_ROUTE States:
-
UnArrived: The player is still underway to the zone.
-
Arrived: The Controllable has arrived at the zone.
+
None: The controllable did not receive route commands.
+
Arrived (*): The controllable has arrived at a route point.
+
Aborted (*): The controllable has aborted the route path.
+
Routing: The controllable is understay to the route point.
+
Pausing: The process is pausing the routing. AI air will go into hover, AI ground will stop moving. Players can fly around.
+
Success (*): All route points were reached.
+
Failed (*): The process has failed.
-
1.2.3) ROUTEZONE state transition functions:
+
(*) End states of the process.
+
+
ACT_ROUTE 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:
Before the state transition.
- The state transition function needs to start with the name OnBefore + the name of the state.
- If the state transition function returns false, then the processing of the state transition will not be done!
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
If you want to change the behaviour of the AIControllable at this event, return false,
but then you'll need to specify your own logic using the AIControllable!
After the state transition.
- The state transition function needs to start with the name OnAfter + the name of the state.
- These state transition functions need to provide a return value, which is specified at the function description.
+ 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.
-
1.3) Manage the ROUTEZONE parameters:
-
The following methods are available to modify the parameters of a ROUTEZONE object:
The ACTROUTEZONE class implements the core functions to route an AIR Controllable player Unit to a Zone.
+The player receives on perioding times messages with the coordinates of the route to follow.
+Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.
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.
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.
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.
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.
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:
Core.Scheduler#SCHEDULER.Start(): (Re-)Start the schedules within the SCHEDULER object. If a CallID is provided to :Start(), only the schedule referenced by CallID will be (re-)started.
+
Core.Scheduler#SCHEDULER.Stop(): Stop the schedules within the SCHEDULER object. If a CallID is provided to :Stop(), then only the schedule referenced by CallID will be stopped.
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.
#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.
#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.
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.
Modify the iterator intervals with the Core.Set#SET_BASE.SetInteratorIntervals method.
You can set the "yield interval", and the "time interval". (See above).
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_ASSIST Events:
+
+
These are the events defined in this class:
+
+
+
Start: The process is started.
+
Next: The process is smoking the targets in the given zone.
+
+
+
ACT_ASSIST 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:
+
+
+
Immediate: The event method has exactly the name of the event.
+
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.
+
+
+
ACT_ASSIST States:
+
+
+
None: The controllable did not receive route commands.
+
AwaitSmoke (*): The process is awaiting to smoke the targets in the zone.
+
Smoking (*): The process is smoking the targets in the zone.
+
Failed (*): The process has failed.
+
+
+
(*) End states of the process.
+
+
ACT_ASSIST 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:
+
+
+
Before the state transition.
+ The state transition method needs to start with the name OnBefore + the name of the state.
+ If the state transition method returns false, then the processing of the state transition will not be done!
+ If you want to change the behaviour of the AIControllable at this event, return false,
+ but then you'll need to specify your own logic using the AIControllable!
+
After the state transition.
+ 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.
The ACTASSISTSMOKETARGETSZONE class implements the core functions to smoke targets in a Zone.
+The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour.
+At random intervals, a new target is smoked.
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:
+
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.
The Zone can be of any type derived from Core.Zone#ZONE_BASE.
Once the Group is spawned within the zone, the Group will continue on its route.
The first waypoint (where the group is spawned) is replaced with the zone location coordinates.
@@ -2094,7 +2096,7 @@ The first waypoint (where the group is spawned) is replaced wit
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:
Wraps the DCS Static objects.
diff --git a/Moose Training/Documentation/StaticObject.html b/Moose Training/Documentation/StaticObject.html
index 6033a6c3f..6c4667c2e 100644
--- a/Moose Training/Documentation/StaticObject.html
+++ b/Moose Training/Documentation/StaticObject.html
@@ -17,7 +17,7 @@
index
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.
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.
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.
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:
Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessRoute#PROCESSROUTE is started to route the active Units in the Group to the attack zone.
Assigned: The SEAD task is assigned to a Wrapper.Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
@@ -117,21 +119,9 @@ The TASK_A2G is implemented using a Type TASK_A2G
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:
Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessRoute#PROCESSROUTE is started to route the active Units in the Group to the attack zone.
Assigned: The SEAD task is assigned to a Wrapper.Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
@@ -209,7 +211,7 @@ The TASK_PICKUP is implemented using a Unit#UNIT TaskUnit :
+
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:
Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessRoute#PROCESSROUTE is started to route the active Units in the Group to the attack zone.
Assigned: The SEAD task is assigned to a Wrapper.Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
@@ -117,21 +119,9 @@ The TASK_SEAD is implemented using a Type TASK_SEAD
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.
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.
-
The ZONE class, defined by the zone name as defined within the Mission Editor.
-This class implements the inherited functions from {Zone#ZONE_RADIUS} taking into account the own zone format and properties.
+This class implements the inherited functions from {Core.Zone#ZONE_RADIUS} taking into account the own zone format and properties.
-
The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.
-This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.
The ZONE_UNIT class defined by a zone around a Wrapper.Unit#UNIT with a radius.
+This class implements the inherited functions from Core.Zone#ZONE_RADIUS taking into account the own zone format and properties.
The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius. The current leader of the group defines the center of the zone.
-This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.
The ZONE_GROUP class defines by a zone around a Wrapper.Group#GROUP with a radius. The current leader of the group defines the center of the zone.
+This class implements the inherited functions from Core.Zone#ZONE_RADIUS taking into account the own zone format and properties.
The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
-This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.
+
The ZONEPOLYGONBASE class defined by a sequence of Wrapper.Group#GROUP waypoints within the Mission Editor, forming a polygon.
+This class implements the inherited functions from Core.Zone#ZONE_RADIUS taking into account the own zone format and properties.
This class is an abstract BASE class for derived classes, and is not meant to be instantiated.
The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
-This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.
The ZONE_POLYGON class defined by a sequence of Wrapper.Group#GROUP waypoints within the Mission Editor, forming a polygon.
+This class implements the inherited functions from Core.Zone#ZONE_RADIUS taking into account the own zone format and properties.