mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #420 from FlightControl-Master/enhancement-353-task-cargo-transport
Enhancement 353 task cargo transport
This commit is contained in:
commit
ccdbed3159
@ -15,55 +15,7 @@
|
||||
--
|
||||
-- * AI_CARGO_GROUPED, represented by a Group of CARGO_UNITs.
|
||||
--
|
||||
-- # 1) @{#AI_CARGO} class, extends @{Fsm#FSM_PROCESS}
|
||||
--
|
||||
-- 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 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) AI_CARGO Events:
|
||||
--
|
||||
-- * @{#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) AI_CARGO States:
|
||||
--
|
||||
-- * **UnLoaded**: The cargo is unloaded from a carrier.
|
||||
-- * **Boarding**: The cargo is currently boarding (= running) into a carrier.
|
||||
-- * **Loaded**: The cargo is loaded into a carrier.
|
||||
-- * **UnBoarding**: The cargo is currently unboarding (=running) from a carrier.
|
||||
-- * **Dead**: The cargo is dead ...
|
||||
-- * **End**: The process has come to an end.
|
||||
--
|
||||
-- ## 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:
|
||||
--
|
||||
-- * **Leaving** the state.
|
||||
-- The state transition method needs to start with the name **OnLeave + 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!
|
||||
--
|
||||
-- * **Entering** the state.
|
||||
-- The state transition method needs to start with the name **OnEnter + the name of the state**.
|
||||
-- These state transition methods need to provide a return value, which is specified at the function description.
|
||||
--
|
||||
-- # 2) #AI_CARGO_UNIT class
|
||||
--
|
||||
-- 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) #AI_CARGO_GROUPED class
|
||||
--
|
||||
-- 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 ...
|
||||
--
|
||||
@ -200,6 +152,49 @@ do -- AI_CARGO
|
||||
-- @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.
|
||||
|
||||
--- # AI\_CARGO class, extends @{Fsm#FSM_PROCESS}
|
||||
--
|
||||
-- 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 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.
|
||||
--
|
||||
-- ## AI\_CARGO Events:
|
||||
--
|
||||
-- * @{#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.
|
||||
--
|
||||
-- ## AI\_CARGO States:
|
||||
--
|
||||
-- * **UnLoaded**: The cargo is unloaded from a carrier.
|
||||
-- * **Boarding**: The cargo is currently boarding (= running) into a carrier.
|
||||
-- * **Loaded**: The cargo is loaded into a carrier.
|
||||
-- * **UnBoarding**: The cargo is currently unboarding (=running) from a carrier.
|
||||
-- * **Dead**: The cargo is dead ...
|
||||
-- * **End**: The process has come to an end.
|
||||
--
|
||||
-- ## 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:
|
||||
--
|
||||
-- * **Leaving** the state.
|
||||
-- The state transition method needs to start with the name **OnLeave + 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!
|
||||
--
|
||||
-- * **Entering** the state.
|
||||
-- The state transition method needs to start with the name **OnEnter + the name of the state**.
|
||||
-- These state transition methods need to provide a return value, which is specified at the function description.
|
||||
--
|
||||
-- @field #AI_CARGO AI_CARGO
|
||||
--
|
||||
AI_CARGO = {
|
||||
ClassName = "AI_CARGO",
|
||||
Type = nil,
|
||||
@ -244,8 +239,8 @@ function AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius )
|
||||
self.Type = Type
|
||||
self.Name = Name
|
||||
self.Weight = Weight
|
||||
self.ReportRadius = ReportRadius
|
||||
self.NearRadius = NearRadius
|
||||
self.ReportRadius = ReportRadius or 1000
|
||||
self.NearRadius = NearRadius or 200
|
||||
self.CargoObject = nil
|
||||
self.CargoCarrier = nil
|
||||
self.Representable = false
|
||||
@ -258,9 +253,39 @@ function AI_CARGO:New( Type, Name, Weight, ReportRadius, NearRadius )
|
||||
|
||||
CARGOS[self.Name] = self
|
||||
|
||||
self:SetEventPriority( 5 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Get the name of the Cargo.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return #string The name of the Cargo.
|
||||
function AI_CARGO:GetName()
|
||||
return self.Name
|
||||
end
|
||||
|
||||
--- Get the type of the Cargo.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return #string The type of the Cargo.
|
||||
function AI_CARGO:GetType()
|
||||
return self.Type
|
||||
end
|
||||
|
||||
--- Check if cargo is loaded.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return #boolean true if loaded
|
||||
function AI_CARGO:IsLoaded()
|
||||
return self:Is( "Loaded" )
|
||||
end
|
||||
|
||||
--- Check if cargo is unloaded.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return #boolean true if unloaded
|
||||
function AI_CARGO:IsUnLoaded()
|
||||
return self:Is( "UnLoaded" )
|
||||
end
|
||||
|
||||
|
||||
--- Template method to spawn a new representation of the AI_CARGO in the simulator.
|
||||
-- @param #AI_CARGO self
|
||||
@ -270,6 +295,46 @@ function AI_CARGO:Spawn( PointVec2 )
|
||||
|
||||
end
|
||||
|
||||
--- Check if CargoCarrier is in the radius for the Cargo to be Loaded.
|
||||
-- @param #AI_CARGO self
|
||||
-- @param Core.Point#POINT_VEC2 PointVec2
|
||||
-- @return #boolean
|
||||
function AI_CARGO:IsInRadius( PointVec2 )
|
||||
self:F( { PointVec2 } )
|
||||
|
||||
local Distance = 0
|
||||
if self:IsLoaded() then
|
||||
Distance = PointVec2:DistanceFromPointVec2( self.CargoCarrier:GetPointVec2() )
|
||||
else
|
||||
Distance = PointVec2:DistanceFromPointVec2( self.CargoObject:GetPointVec2() )
|
||||
end
|
||||
self:T( Distance )
|
||||
|
||||
if Distance <= self.ReportRadius then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Check if Cargo is the given @{Zone}.
|
||||
-- @param #AI_CARGO self
|
||||
-- @param Core.Zone#ZONE_BASE Zone
|
||||
-- @return #boolean **true** if cargo is in the Zone, **false** if cargo is not in the Zone.
|
||||
function AI_CARGO:IsInZone( Zone )
|
||||
self:F( { Zone } )
|
||||
|
||||
if self:IsLoaded() then
|
||||
return Zone:IsPointVec2InZone( self.CargoCarrier:GetPointVec2() )
|
||||
else
|
||||
return Zone:IsPointVec2InZone( self.CargoObject:GetPointVec2() )
|
||||
end
|
||||
|
||||
return nil
|
||||
|
||||
end
|
||||
|
||||
|
||||
--- Check if CargoCarrier is near the Cargo to be Loaded.
|
||||
-- @param #AI_CARGO self
|
||||
@ -288,6 +353,20 @@ function AI_CARGO:IsNear( PointVec2 )
|
||||
end
|
||||
end
|
||||
|
||||
--- Get the current PointVec2 of the cargo.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return Core.Point#POINT_VEC2
|
||||
function AI_CARGO:GetPointVec2()
|
||||
return self.CargoObject:GetPointVec2()
|
||||
end
|
||||
|
||||
--- Get the range till cargo will board.
|
||||
-- @param #AI_CARGO self
|
||||
-- @return #number The range till cargo will board.
|
||||
function AI_CARGO:GetBoardingRange()
|
||||
return self.ReportRadius
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- AI_CARGO_REPRESENTABLE
|
||||
@ -340,6 +419,16 @@ do -- AI_CARGO_UNIT
|
||||
|
||||
--- @type AI_CARGO_UNIT
|
||||
-- @extends #AI_CARGO_REPRESENTABLE
|
||||
|
||||
--- # AI\_CARGO\_UNIT class, extends @{#AI_CARGO_REPRESENTABLE}
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #AI_CARGO_UNIT AI_CARGO_UNIT
|
||||
--
|
||||
AI_CARGO_UNIT = {
|
||||
ClassName = "AI_CARGO_UNIT"
|
||||
}
|
||||
@ -362,6 +451,20 @@ function AI_CARGO_UNIT:New( CargoUnit, Type, Name, Weight, ReportRadius, NearRad
|
||||
|
||||
self:T( self.ClassName )
|
||||
|
||||
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
|
||||
_EVENTDISPATCHER:CreateEventNewCargo( self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- AI_CARGO_UNIT Destructor.
|
||||
-- @param #AI_CARGO_UNIT self
|
||||
-- @return #AI_CARGO_UNIT
|
||||
function AI_CARGO_UNIT:Destroy()
|
||||
|
||||
-- Cargo objects are deleted from the _DATABASE and SET_CARGO objects.
|
||||
_EVENTDISPATCHER:CreateEventDeleteCargo( self )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
@ -503,7 +606,7 @@ end
|
||||
-- @param #string From
|
||||
-- @param #string To
|
||||
-- @param Wrapper.Unit#UNIT CargoCarrier
|
||||
function AI_CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier )
|
||||
function AI_CARGO_UNIT:onenterBoarding( From, Event, To, CargoCarrier, ... )
|
||||
self:F( { CargoCarrier.UnitName, From, Event, To } )
|
||||
|
||||
local Speed = 10
|
||||
@ -535,14 +638,14 @@ end
|
||||
-- @param #string From
|
||||
-- @param #string To
|
||||
-- @param Wrapper.Unit#UNIT CargoCarrier
|
||||
function AI_CARGO_UNIT:onleaveBoarding( From, Event, To, CargoCarrier )
|
||||
function AI_CARGO_UNIT:onleaveBoarding( From, Event, To, CargoCarrier, ... )
|
||||
self:F( { CargoCarrier.UnitName, From, Event, To } )
|
||||
|
||||
if self:IsNear( CargoCarrier:GetPointVec2() ) then
|
||||
self:__Load( 1, CargoCarrier )
|
||||
self:__Load( 1, CargoCarrier, ... )
|
||||
return true
|
||||
else
|
||||
self:__Boarding( 1, CargoCarrier )
|
||||
self:__Boarding( 1, CargoCarrier, ... )
|
||||
end
|
||||
return false
|
||||
end
|
||||
@ -571,7 +674,7 @@ end
|
||||
-- @param #string Event
|
||||
-- @param #string From
|
||||
-- @param #string To
|
||||
function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier )
|
||||
function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier, ... )
|
||||
self:F()
|
||||
|
||||
self.CargoInAir = self.CargoObject:InAir()
|
||||
@ -581,7 +684,7 @@ function AI_CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier )
|
||||
-- Only move the group to the carrier when the cargo is not in the air
|
||||
-- (eg. cargo can be on a oil derrick, moving the cargo on the oil derrick will drop the cargo on the sea).
|
||||
if not self.CargoInAir then
|
||||
self:Load( CargoCarrier )
|
||||
self:Load( CargoCarrier, ... )
|
||||
end
|
||||
|
||||
end
|
||||
@ -809,6 +912,14 @@ do -- 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.
|
||||
|
||||
--- # AI\_CARGO\_GROUP class
|
||||
--
|
||||
-- The AI\_CARGO\_GROUP 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\_GROUP to and from carrier.
|
||||
--
|
||||
-- @field #AI_CARGO_GROUP AI_CARGO_GROUP
|
||||
--
|
||||
AI_CARGO_GROUP = {
|
||||
ClassName = "AI_CARGO_GROUP",
|
||||
}
|
||||
@ -838,6 +949,14 @@ do -- AI_CARGO_GROUPED
|
||||
|
||||
--- @type AI_CARGO_GROUPED
|
||||
-- @extends AI.AI_Cargo#AI_CARGO_GROUP
|
||||
|
||||
--- # AI\_CARGO\_GROUPED class
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- @field #AI_CARGO_GROUPED AI_CARGO_GROUPED
|
||||
--
|
||||
AI_CARGO_GROUPED = {
|
||||
ClassName = "AI_CARGO_GROUPED",
|
||||
}
|
||||
|
||||
@ -6,12 +6,14 @@
|
||||
-- ===================================================
|
||||
-- Mission designers can use the DATABASE class to refer to:
|
||||
--
|
||||
-- * STATICS
|
||||
-- * UNITS
|
||||
-- * GROUPS
|
||||
-- * CLIENTS
|
||||
-- * AIRPORTS
|
||||
-- * AIRBASES
|
||||
-- * PLAYERSJOINED
|
||||
-- * PLAYERS
|
||||
-- * CARGOS
|
||||
--
|
||||
-- On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.
|
||||
--
|
||||
@ -54,6 +56,7 @@ DATABASE = {
|
||||
PLAYERS = {},
|
||||
PLAYERSJOINED = {},
|
||||
CLIENTS = {},
|
||||
CARGOS = {},
|
||||
AIRBASES = {},
|
||||
COUNTRY_ID = {},
|
||||
COUNTRY_NAME = {},
|
||||
@ -85,13 +88,15 @@ local _DATABASECategory =
|
||||
function DATABASE:New()
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #DATABASE
|
||||
|
||||
self:SetEventPriority( 1 )
|
||||
|
||||
self:HandleEvent( EVENTS.Birth, self._EventOnBirth )
|
||||
self:HandleEvent( EVENTS.Dead, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.Crash, self._EventOnDeadOrCrash )
|
||||
self:HandleEvent( EVENTS.NewCargo )
|
||||
self:HandleEvent( EVENTS.DeleteCargo )
|
||||
|
||||
-- Follow alive players and clients
|
||||
self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit )
|
||||
@ -167,22 +172,24 @@ end
|
||||
|
||||
--- Adds a Airbase based on the Airbase Name in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:AddAirbase( DCSAirbaseName )
|
||||
-- @param #string AirbaseName The name of the airbase
|
||||
function DATABASE:AddAirbase( AirbaseName )
|
||||
|
||||
if not self.AIRBASES[DCSAirbaseName] then
|
||||
self.AIRBASES[DCSAirbaseName] = AIRBASE:Register( DCSAirbaseName )
|
||||
if not self.AIRBASES[AirbaseName] then
|
||||
self.AIRBASES[AirbaseName] = AIRBASE:Register( AirbaseName )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Deletes a Airbase from the DATABASE based on the Airbase Name.
|
||||
-- @param #DATABASE self
|
||||
function DATABASE:DeleteAirbase( DCSAirbaseName )
|
||||
-- @param #string AirbaseName The name of the airbase
|
||||
function DATABASE:DeleteAirbase( AirbaseName )
|
||||
|
||||
--self.AIRBASES[DCSAirbaseName] = nil
|
||||
self.AIRBASES[AirbaseName] = nil
|
||||
end
|
||||
|
||||
--- Finds a AIRBASE based on the AirbaseName.
|
||||
--- Finds an AIRBASE based on the AirbaseName.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string AirbaseName
|
||||
-- @return Wrapper.Airbase#AIRBASE The found AIRBASE.
|
||||
@ -192,6 +199,35 @@ function DATABASE:FindAirbase( AirbaseName )
|
||||
return AirbaseFound
|
||||
end
|
||||
|
||||
--- Adds a Cargo based on the Cargo Name in the DATABASE.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string CargoName The name of the airbase
|
||||
function DATABASE:AddCargo( Cargo )
|
||||
|
||||
if not self.CARGOS[Cargo.Name] then
|
||||
self.CARGOS[Cargo.Name] = Cargo
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Deletes a Cargo from the DATABASE based on the Cargo Name.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string CargoName The name of the airbase
|
||||
function DATABASE:DeleteCargo( CargoName )
|
||||
|
||||
self.CARGOS[CargoName] = nil
|
||||
end
|
||||
|
||||
--- Finds an CARGO based on the CargoName.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string CargoName
|
||||
-- @return Wrapper.Cargo#CARGO The found CARGO.
|
||||
function DATABASE:FindCargo( CargoName )
|
||||
|
||||
local CargoFound = self.CARGOS[CargoName]
|
||||
return CargoFound
|
||||
end
|
||||
|
||||
|
||||
--- Finds a CLIENT based on the ClientName.
|
||||
-- @param #DATABASE self
|
||||
@ -714,7 +750,7 @@ end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each **alive** UNIT, providing the UNIT and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive UNIT in the database. The function needs to accept a UNIT parameter.
|
||||
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachUnit( IteratorFunction, FinalizeFunction, ... )
|
||||
self:F2( arg )
|
||||
@ -726,7 +762,7 @@ end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each **alive** GROUP, providing the GROUP and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive GROUP in the database. The function needs to accept a GROUP parameter.
|
||||
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a GROUP parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachGroup( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
@ -739,7 +775,7 @@ end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each **ALIVE** player, providing the player name and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an player in the database. The function needs to accept the player name.
|
||||
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept the player name.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachPlayer( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
@ -752,7 +788,7 @@ end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is was a player in the database. The function needs to accept a UNIT parameter.
|
||||
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachPlayerJoined( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
@ -764,7 +800,7 @@ end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive player in the database. The function needs to accept a CLIENT parameter.
|
||||
-- @param #function IteratorFunction The function that will be called object in the database. The function needs to accept a CLIENT parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachClient( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
@ -774,6 +810,43 @@ function DATABASE:ForEachClient( IteratorFunction, ... )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.
|
||||
-- @param #DATABASE self
|
||||
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:ForEachCargo( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.CARGOS )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Handles the OnEventNewCargo event.
|
||||
-- @param #DATABASE self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function DATABASE:OnEventNewCargo( EventData )
|
||||
self:F2( { EventData } )
|
||||
|
||||
if EventData.Cargo then
|
||||
self:AddCargo( EventData.Cargo )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Handles the OnEventDeleteCargo.
|
||||
-- @param #DATABASE self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function DATABASE:OnEventDeleteCargo( EventData )
|
||||
self:F2( { EventData } )
|
||||
|
||||
if EventData.Cargo then
|
||||
self:DeleteCargo( EventData.Cargo.Name )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- @param #DATABASE self
|
||||
function DATABASE:_RegisterTemplates()
|
||||
self:F2()
|
||||
|
||||
@ -197,6 +197,9 @@ EVENT = {
|
||||
ClassID = 0,
|
||||
}
|
||||
|
||||
world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000
|
||||
world.event.S_EVENT_DELETE_CARGO = world.event.S_EVENT_MAX + 1001
|
||||
|
||||
--- The different types of events supported by MOOSE.
|
||||
-- Use this structure to subscribe to events using the @{Base#BASE.HandleEvent}() method.
|
||||
-- @type EVENTS
|
||||
@ -224,13 +227,15 @@ EVENTS = {
|
||||
PlayerComment = world.event.S_EVENT_PLAYER_COMMENT,
|
||||
ShootingStart = world.event.S_EVENT_SHOOTING_START,
|
||||
ShootingEnd = world.event.S_EVENT_SHOOTING_END,
|
||||
NewCargo = world.event.S_EVENT_NEW_CARGO,
|
||||
DeleteCargo = world.event.S_EVENT_DELETE_CARGO,
|
||||
}
|
||||
|
||||
--- The Event structure
|
||||
-- Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event:
|
||||
--
|
||||
-- * A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
|
||||
-- * A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ
|
||||
-- * A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ
|
||||
--
|
||||
-- @type EVENTDATA
|
||||
-- @field #number id The identifier of the event.
|
||||
@ -271,6 +276,7 @@ EVENTS = {
|
||||
-- @field WeaponTgtDCSUnit
|
||||
|
||||
|
||||
|
||||
local _EVENTMETA = {
|
||||
[world.event.S_EVENT_SHOT] = {
|
||||
Order = 1,
|
||||
@ -410,6 +416,16 @@ local _EVENTMETA = {
|
||||
Event = "OnEventShootingEnd",
|
||||
Text = "S_EVENT_SHOOTING_END"
|
||||
},
|
||||
[EVENTS.NewCargo] = {
|
||||
Order = 1,
|
||||
Event = "OnEventNewCargo",
|
||||
Text = "S_EVENT_NEW_CARGO"
|
||||
},
|
||||
[EVENTS.DeleteCargo] = {
|
||||
Order = 1,
|
||||
Event = "OnEventDeleteCargo",
|
||||
Text = "S_EVENT_DELETE_CARGO"
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -682,6 +698,39 @@ do -- OnEngineShutDown
|
||||
|
||||
end
|
||||
|
||||
do -- Event Creation
|
||||
|
||||
--- Creation of a New Cargo Event.
|
||||
-- @param #EVENT self
|
||||
-- @param AI.AI_Cargo#AI_CARGO Cargo The Cargo created.
|
||||
function EVENT:CreateEventNewCargo( Cargo )
|
||||
self:F( { Cargo } )
|
||||
|
||||
local Event = {
|
||||
id = EVENTS.NewCargo,
|
||||
time = timer.getTime(),
|
||||
cargo = Cargo,
|
||||
}
|
||||
|
||||
world.onEvent( Event )
|
||||
end
|
||||
|
||||
--- Creation of a Cargo Deletion Event.
|
||||
-- @param #EVENT self
|
||||
-- @param AI.AI_Cargo#AI_CARGO Cargo The Cargo created.
|
||||
function EVENT:CreateEventDeleteCargo( Cargo )
|
||||
self:F( { Cargo } )
|
||||
|
||||
local Event = {
|
||||
id = EVENTS.DeleteCargo,
|
||||
time = timer.getTime(),
|
||||
cargo = Cargo,
|
||||
}
|
||||
|
||||
world.onEvent( Event )
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--- @param #EVENT self
|
||||
-- @param #EVENTDATA Event
|
||||
@ -805,6 +854,11 @@ function EVENT:onEvent( Event )
|
||||
--Event.WeaponTgtDCSUnit = Event.Weapon:getTarget()
|
||||
end
|
||||
|
||||
if Event.cargo then
|
||||
Event.Cargo = Event.cargo
|
||||
Event.CargoName = Event.cargo.Name
|
||||
end
|
||||
|
||||
local PriorityOrder = EventMeta.Order
|
||||
local PriorityBegin = PriorityOrder == -1 and 5 or 1
|
||||
local PriorityEnd = PriorityOrder == -1 and 1 or 5
|
||||
|
||||
@ -2391,3 +2391,346 @@ function SET_AIRBASE:IsIncludeObject( MAirbase )
|
||||
self:T2( MAirbaseInclude )
|
||||
return MAirbaseInclude
|
||||
end
|
||||
|
||||
--- @type SET_CARGO
|
||||
-- @extends Core.Set#SET_BASE
|
||||
|
||||
--- # SET_CARGO class, extends @{Set#SET_BASE}
|
||||
--
|
||||
-- Mission designers can use the @{Set#SET_CARGO} class to build sets of cargos optionally belonging to certain:
|
||||
--
|
||||
-- * Coalitions
|
||||
-- * Types
|
||||
-- * Name or Prefix
|
||||
--
|
||||
-- ## SET_CARGO constructor
|
||||
--
|
||||
-- Create a new SET_CARGO object with the @{#SET_CARGO.New} method:
|
||||
--
|
||||
-- * @{#SET_CARGO.New}: Creates a new SET_CARGO object.
|
||||
--
|
||||
-- ## Add or Remove CARGOs from SET_CARGO
|
||||
--
|
||||
-- CARGOs can be added and removed using the @{Set#SET_CARGO.AddCargosByName} and @{Set#SET_CARGO.RemoveCargosByName} respectively.
|
||||
-- These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.
|
||||
--
|
||||
-- ## SET_CARGO filter criteria
|
||||
--
|
||||
-- You can set filter criteria to automatically maintain the SET_CARGO contents.
|
||||
-- Filter criteria are defined by:
|
||||
--
|
||||
-- * @{#SET_CARGO.FilterCoalitions}: Builds the SET_CARGO with the cargos belonging to the coalition(s).
|
||||
-- * @{#SET_CARGO.FilterPrefixes}: Builds the SET_CARGO with the cargos containing the prefix string(s).
|
||||
-- * @{#SET_CARGO.FilterTypes}: Builds the SET_CARGO with the cargos belonging to the cargo type(s).
|
||||
-- * @{#SET_CARGO.FilterCountries}: Builds the SET_CARGO with the cargos belonging to the country(ies).
|
||||
--
|
||||
-- Once the filter criteria have been set for the SET_CARGO, you can start filtering using:
|
||||
--
|
||||
-- * @{#SET_CARGO.FilterStart}: Starts the filtering of the cargos within the SET_CARGO.
|
||||
--
|
||||
-- ## SET_CARGO iterators
|
||||
--
|
||||
-- Once the filters have been defined and the SET_CARGO has been built, you can iterate the SET_CARGO with the available iterator methods.
|
||||
-- The iterator methods will walk the SET_CARGO set, and call for each cargo within the set a function that you provide.
|
||||
-- The following iterator methods are currently available within the SET_CARGO:
|
||||
--
|
||||
-- * @{#SET_CARGO.ForEachCargo}: Calls a function for each cargo it finds within the SET_CARGO.
|
||||
--
|
||||
-- @field #SET_CARGO SET_CARGO
|
||||
--
|
||||
SET_CARGO = {
|
||||
ClassName = "SET_CARGO",
|
||||
Cargos = {},
|
||||
Filter = {
|
||||
Coalitions = nil,
|
||||
Types = nil,
|
||||
Countries = nil,
|
||||
ClientPrefixes = nil,
|
||||
},
|
||||
FilterMeta = {
|
||||
Coalitions = {
|
||||
red = coalition.side.RED,
|
||||
blue = coalition.side.BLUE,
|
||||
neutral = coalition.side.NEUTRAL,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
--- Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.
|
||||
-- @param #SET_CARGO self
|
||||
-- @return #SET_CARGO self
|
||||
-- @usage
|
||||
-- -- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
|
||||
-- DatabaseSet = SET_CARGO:New()
|
||||
function SET_CARGO:New()
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, SET_BASE:New( _DATABASE.CARGOS ) )
|
||||
|
||||
self:HandleEvent( EVENTS.NewCargo )
|
||||
self:HandleEvent( EVENTS.DeleteCargo )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Add CARGOs to SET_CARGO.
|
||||
-- @param Core.Set#SET_CARGO self
|
||||
-- @param #string AddCargoNames A single name or an array of CARGO names.
|
||||
-- @return self
|
||||
function SET_CARGO:AddCargosByName( AddCargoNames )
|
||||
|
||||
local AddCargoNamesArray = ( type( AddCargoNames ) == "table" ) and AddCargoNames or { AddCargoNames }
|
||||
|
||||
for AddCargoID, AddCargoName in pairs( AddCargoNamesArray ) do
|
||||
self:Add( AddCargoName, CARGO:FindByName( AddCargoName ) )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Remove CARGOs from SET_CARGO.
|
||||
-- @param Core.Set#SET_CARGO self
|
||||
-- @param Wrapper.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names.
|
||||
-- @return self
|
||||
function SET_CARGO:RemoveCargosByName( RemoveCargoNames )
|
||||
|
||||
local RemoveCargoNamesArray = ( type( RemoveCargoNames ) == "table" ) and RemoveCargoNames or { RemoveCargoNames }
|
||||
|
||||
for RemoveCargoID, RemoveCargoName in pairs( RemoveCargoNamesArray ) do
|
||||
self:Remove( RemoveCargoName.CargoName )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Finds a Cargo based on the Cargo Name.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string CargoName
|
||||
-- @return Wrapper.Cargo#CARGO The found Cargo.
|
||||
function SET_CARGO:FindCargo( CargoName )
|
||||
|
||||
local CargoFound = self.Set[CargoName]
|
||||
return CargoFound
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Builds a set of cargos of coalitions.
|
||||
-- Possible current coalitions are red, blue and neutral.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterCoalitions( Coalitions )
|
||||
if not self.Filter.Coalitions then
|
||||
self.Filter.Coalitions = {}
|
||||
end
|
||||
if type( Coalitions ) ~= "table" then
|
||||
Coalitions = { Coalitions }
|
||||
end
|
||||
for CoalitionID, Coalition in pairs( Coalitions ) do
|
||||
self.Filter.Coalitions[Coalition] = Coalition
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
--- Builds a set of cargos of defined cargo types.
|
||||
-- Possible current types are those types known within DCS world.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Types Can take those type strings known within DCS world.
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterTypes( Types )
|
||||
if not self.Filter.Types then
|
||||
self.Filter.Types = {}
|
||||
end
|
||||
if type( Types ) ~= "table" then
|
||||
Types = { Types }
|
||||
end
|
||||
for TypeID, Type in pairs( Types ) do
|
||||
self.Filter.Types[Type] = Type
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of cargos of defined countries.
|
||||
-- Possible current countries are those known within DCS world.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Countries Can take those country strings known within DCS world.
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterCountries( Countries )
|
||||
if not self.Filter.Countries then
|
||||
self.Filter.Countries = {}
|
||||
end
|
||||
if type( Countries ) ~= "table" then
|
||||
Countries = { Countries }
|
||||
end
|
||||
for CountryID, Country in pairs( Countries ) do
|
||||
self.Filter.Countries[Country] = Country
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Builds a set of cargos of defined cargo prefixes.
|
||||
-- All the cargos starting with the given prefixes will be included within the set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #string Prefixes The prefix of which the cargo name starts with.
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterPrefixes( Prefixes )
|
||||
if not self.Filter.CargoPrefixes then
|
||||
self.Filter.CargoPrefixes = {}
|
||||
end
|
||||
if type( Prefixes ) ~= "table" then
|
||||
Prefixes = { Prefixes }
|
||||
end
|
||||
for PrefixID, Prefix in pairs( Prefixes ) do
|
||||
self.Filter.CargoPrefixes[Prefix] = Prefix
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Starts the filtering.
|
||||
-- @param #SET_CARGO self
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:FilterStart()
|
||||
|
||||
if _DATABASE then
|
||||
self:_FilterStart()
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Handles the Database to check on an event (birth) that the Object was added in the Database.
|
||||
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
-- @return #string The name of the CARGO
|
||||
-- @return #table The CARGO
|
||||
function SET_CARGO:AddInDatabase( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Handles the Database to check on any event that Object exists in the Database.
|
||||
-- This is required, because sometimes the _DATABASE event gets called later than the SET_BASE event or vise versa!
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
-- @return #string The name of the CARGO
|
||||
-- @return #table The CARGO
|
||||
function SET_CARGO:FindInDatabase( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
|
||||
end
|
||||
|
||||
--- Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param #function IteratorFunction The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:ForEachCargo( IteratorFunction, ... )
|
||||
self:F2( arg )
|
||||
|
||||
self:ForEach( IteratorFunction, arg, self.Set )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Iterate the SET_CARGO while identifying the nearest @{Cargo#CARGO} from a @{Point#POINT_VEC2}.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Point#POINT_VEC2 PointVec2 A @{Point#POINT_VEC2} object from where to evaluate the closest @{Cargo#CARGO}.
|
||||
-- @return Wrapper.Cargo#CARGO The closest @{Cargo#CARGO}.
|
||||
function SET_CARGO:FindNearestCargoFromPointVec2( PointVec2 )
|
||||
self:F2( PointVec2 )
|
||||
|
||||
local NearestCargo = self:FindNearestObjectFromPointVec2( PointVec2 )
|
||||
return NearestCargo
|
||||
end
|
||||
|
||||
|
||||
|
||||
---
|
||||
-- @param #SET_CARGO self
|
||||
-- @param AI.AI_Cargo#AI_CARGO MCargo
|
||||
-- @return #SET_CARGO self
|
||||
function SET_CARGO:IsIncludeObject( MCargo )
|
||||
self:F2( MCargo )
|
||||
|
||||
local MCargoInclude = true
|
||||
|
||||
if MCargo then
|
||||
local MCargoName = MCargo:GetName()
|
||||
|
||||
if self.Filter.Coalitions then
|
||||
local MCargoCoalition = false
|
||||
for CoalitionID, CoalitionName in pairs( self.Filter.Coalitions ) do
|
||||
local CargoCoalitionID = MCargo:GetCoalition()
|
||||
self:T3( { "Coalition:", CargoCoalitionID, self.FilterMeta.Coalitions[CoalitionName], CoalitionName } )
|
||||
if self.FilterMeta.Coalitions[CoalitionName] and self.FilterMeta.Coalitions[CoalitionName] == CargoCoalitionID then
|
||||
MCargoCoalition = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Coalition", MCargoCoalition } )
|
||||
MCargoInclude = MCargoInclude and MCargoCoalition
|
||||
end
|
||||
|
||||
if self.Filter.Types then
|
||||
local MCargoType = false
|
||||
for TypeID, TypeName in pairs( self.Filter.Types ) do
|
||||
self:T3( { "Type:", MCargo:GetType(), TypeName } )
|
||||
if TypeName == MCargo:GetType() then
|
||||
MCargoType = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Type", MCargoType } )
|
||||
MCargoInclude = MCargoInclude and MCargoType
|
||||
end
|
||||
|
||||
if self.Filter.CargoPrefixes then
|
||||
local MCargoPrefix = false
|
||||
for CargoPrefixId, CargoPrefix in pairs( self.Filter.CargoPrefixes ) do
|
||||
self:T3( { "Prefix:", string.find( MCargo.Name, CargoPrefix, 1 ), CargoPrefix } )
|
||||
if string.find( MCargo.Name, CargoPrefix, 1 ) then
|
||||
MCargoPrefix = true
|
||||
end
|
||||
end
|
||||
self:T( { "Evaluated Prefix", MCargoPrefix } )
|
||||
MCargoInclude = MCargoInclude and MCargoPrefix
|
||||
end
|
||||
end
|
||||
|
||||
self:T2( MCargoInclude )
|
||||
return MCargoInclude
|
||||
end
|
||||
|
||||
--- Handles the OnEventNewCargo event for the Set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function SET_CARGO:OnEventNewCargo( EventData )
|
||||
|
||||
if EventData.Cargo then
|
||||
if EventData.Cargo and self:IsIncludeObject( EventData.Cargo ) then
|
||||
self:Add( EventData.Cargo.Name , EventData.Cargo )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Handles the OnDead or OnCrash event for alive units set.
|
||||
-- @param #SET_CARGO self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function SET_CARGO:OnEventDeleteCargo( EventData )
|
||||
self:F3( { EventData } )
|
||||
|
||||
if EventData.Cargo then
|
||||
local Cargo = _DATABASE:FindCargo( EventData.Cargo.Name )
|
||||
if Cargo and Cargo.Name then
|
||||
self:Remove( Cargo.Name )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -73,41 +73,41 @@
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # 1) ZONE_BASE class, extends @{Base#BASE}
|
||||
--- # ZONE_BASE class, extends @{Base#BASE}
|
||||
--
|
||||
-- This class is an abstract BASE class for derived classes, and is not meant to be instantiated.
|
||||
--
|
||||
-- ## 1.1) Each zone has a name:
|
||||
-- ## Each zone has a name:
|
||||
--
|
||||
-- * @{#ZONE_BASE.GetName}(): Returns the name of the zone.
|
||||
--
|
||||
-- ## 1.2) Each zone implements two polymorphic functions defined in @{Zone#ZONE_BASE}:
|
||||
-- ## Each zone implements two polymorphic functions defined in @{Zone#ZONE_BASE}:
|
||||
--
|
||||
-- * @{#ZONE_BASE.IsVec2InZone}(): Returns if a Vec2 is within the zone.
|
||||
-- * @{#ZONE_BASE.IsVec3InZone}(): Returns if a Vec3 is within the zone.
|
||||
--
|
||||
-- ## 1.3) A zone has a probability factor that can be set to randomize a selection between zones:
|
||||
-- ## A zone has a probability factor that can be set to randomize a selection between zones:
|
||||
--
|
||||
-- * @{#ZONE_BASE.SetRandomizeProbability}(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )
|
||||
-- * @{#ZONE_BASE.GetRandomizeProbability}(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )
|
||||
-- * @{#ZONE_BASE.GetZoneMaybe}(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.
|
||||
--
|
||||
-- ## 1.4) A zone manages Vectors:
|
||||
-- ## A zone manages Vectors:
|
||||
--
|
||||
-- * @{#ZONE_BASE.GetVec2}(): Returns the @{DCSTypes#Vec2} coordinate of the zone.
|
||||
-- * @{#ZONE_BASE.GetRandomVec2}(): Define a random @{DCSTypes#Vec2} within the zone.
|
||||
--
|
||||
-- ## 1.5) A zone has a bounding square:
|
||||
-- ## A zone has a bounding square:
|
||||
--
|
||||
-- * @{#ZONE_BASE.GetBoundingSquare}(): Get the outer most bounding square of the zone.
|
||||
--
|
||||
-- ## 1.6) A zone can be marked:
|
||||
-- ## A zone can be marked:
|
||||
--
|
||||
-- * @{#ZONE_BASE.SmokeZone}(): Smokes the zone boundaries in a color.
|
||||
-- * @{#ZONE_BASE.FlareZone}(): Flares the zone boundaries in a color.
|
||||
--
|
||||
-- ===
|
||||
-- @field #ZONE_BASE ZONE_BASE
|
||||
--
|
||||
ZONE_BASE = {
|
||||
ClassName = "ZONE_BASE",
|
||||
ZoneName = "",
|
||||
@ -144,20 +144,21 @@ function ZONE_BASE:GetName()
|
||||
|
||||
return self.ZoneName
|
||||
end
|
||||
--- Returns if a location is within the zone.
|
||||
|
||||
--- Returns if a Vec2 is within the zone.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @param Dcs.DCSTypes#Vec2 Vec2 The location to test.
|
||||
-- @return #boolean true if the location is within the zone.
|
||||
-- @param Dcs.DCSTypes#Vec2 Vec2 The Vec2 to test.
|
||||
-- @return #boolean true if the Vec2 is within the zone.
|
||||
function ZONE_BASE:IsVec2InZone( Vec2 )
|
||||
self:F2( Vec2 )
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
--- Returns if a point is within the zone.
|
||||
--- Returns if a Vec3 is within the zone.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @param Dcs.DCSTypes#Vec3 Vec3 The point to test.
|
||||
-- @return #boolean true if the point is within the zone.
|
||||
-- @return #boolean true if the Vec3 is within the zone.
|
||||
function ZONE_BASE:IsVec3InZone( Vec3 )
|
||||
self:F2( Vec3 )
|
||||
|
||||
@ -166,6 +167,31 @@ function ZONE_BASE:IsVec3InZone( Vec3 )
|
||||
return InZone
|
||||
end
|
||||
|
||||
--- Returns if a PointVec2 is within the zone.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @param Core.Point#POINT_VEC2 PointVec2 The PointVec2 to test.
|
||||
-- @return #boolean true if the PointVec2 is within the zone.
|
||||
function ZONE_BASE:IsPointVec2InZone( PointVec2 )
|
||||
self:F2( PointVec2 )
|
||||
|
||||
local InZone = self:IsVec2InZone( PointVec2:GetVec2() )
|
||||
|
||||
return InZone
|
||||
end
|
||||
|
||||
--- Returns if a PointVec3 is within the zone.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @param Core.Point#POINT_VEC3 PointVec3 The PointVec3 to test.
|
||||
-- @return #boolean true if the PointVec3 is within the zone.
|
||||
function ZONE_BASE:IsPointVec3InZone( PointVec3 )
|
||||
self:F2( PointVec3 )
|
||||
|
||||
local InZone = self:IsPointVec2InZone( PointVec3 )
|
||||
|
||||
return InZone
|
||||
end
|
||||
|
||||
|
||||
--- Returns the @{DCSTypes#Vec2} coordinate of the zone.
|
||||
-- @param #ZONE_BASE self
|
||||
-- @return #nil.
|
||||
@ -310,29 +336,29 @@ end
|
||||
-- @type ZONE_RADIUS
|
||||
-- @field Dcs.DCSTypes#Vec2 Vec2 The current location of the zone.
|
||||
-- @field Dcs.DCSTypes#Distance Radius The radius of the zone.
|
||||
-- @extends Core.Zone#ZONE_BASE
|
||||
-- @extends #ZONE_BASE
|
||||
|
||||
--- # 2) @{Zone#ZONE_RADIUS} class, extends @{Zone#ZONE_BASE}
|
||||
--- # ZONE_RADIUS class, extends @{Zone#ZONE_BASE}
|
||||
--
|
||||
-- The ZONE_RADIUS class defined by a zone name, a location and a radius.
|
||||
-- This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.
|
||||
--
|
||||
-- ## 2.1) @{Zone#ZONE_RADIUS} constructor
|
||||
-- ## ZONE_RADIUS constructor
|
||||
--
|
||||
-- * @{#ZONE_RADIUS.New}(): Constructor.
|
||||
--
|
||||
-- ## 2.2) Manage the radius of the zone
|
||||
-- ## Manage the radius of the zone
|
||||
--
|
||||
-- * @{#ZONE_RADIUS.SetRadius}(): Sets the radius of the zone.
|
||||
-- * @{#ZONE_RADIUS.GetRadius}(): Returns the radius of the zone.
|
||||
--
|
||||
-- ## 2.3) Manage the location of the zone
|
||||
-- ## Manage the location of the zone
|
||||
--
|
||||
-- * @{#ZONE_RADIUS.SetVec2}(): Sets the @{DCSTypes#Vec2} of the zone.
|
||||
-- * @{#ZONE_RADIUS.GetVec2}(): Returns the @{DCSTypes#Vec2} of the zone.
|
||||
-- * @{#ZONE_RADIUS.GetVec3}(): Returns the @{DCSTypes#Vec3} of the zone, taking an additional height parameter.
|
||||
--
|
||||
-- ## 2.4) Zone point randomization
|
||||
-- ## Zone point randomization
|
||||
--
|
||||
-- Various functions exist to find random points within the zone.
|
||||
--
|
||||
@ -340,8 +366,6 @@ end
|
||||
-- * @{#ZONE_RADIUS.GetRandomPointVec2}(): Gets a @{Point#POINT_VEC2} object representing a random 2D point in the zone.
|
||||
-- * @{#ZONE_RADIUS.GetRandomPointVec3}(): Gets a @{Point#POINT_VEC3} object representing a random 3D point in the zone. Note that the height of the point is at landheight.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE_RADIUS ZONE_RADIUS
|
||||
--
|
||||
ZONE_RADIUS = {
|
||||
@ -616,16 +640,14 @@ end
|
||||
|
||||
|
||||
--- @type ZONE
|
||||
-- @extends Core.Zone#ZONE_RADIUS
|
||||
-- @extends #ZONE_RADIUS
|
||||
|
||||
|
||||
--- # 3) ZONE class, extends @{Zone#ZONE_RADIUS}
|
||||
--- # ZONE class, extends @{Zone#ZONE_RADIUS}
|
||||
--
|
||||
-- The ZONE class, defined by the zone name as defined within the Mission Editor.
|
||||
-- This class implements the inherited functions from @{#ZONE_RADIUS} taking into account the own zone format and properties.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE ZONE
|
||||
--
|
||||
ZONE = {
|
||||
@ -655,18 +677,15 @@ function ZONE:New( ZoneName )
|
||||
end
|
||||
|
||||
|
||||
--- The ZONE_UNIT class defined by a zone around a @{Unit#UNIT} with a radius.
|
||||
-- @type ZONE_UNIT
|
||||
--- @type ZONE_UNIT
|
||||
-- @field Wrapper.Unit#UNIT ZoneUNIT
|
||||
-- @extends Core.Zone#ZONE_RADIUS
|
||||
|
||||
--- # 4) #ZONE_UNIT class, extends @{Zone#ZONE_RADIUS}
|
||||
--- # ZONE_UNIT class, extends @{Zone#ZONE_RADIUS}
|
||||
--
|
||||
-- The ZONE_UNIT class defined by a zone around a @{Unit#UNIT} with a radius.
|
||||
-- This class implements the inherited functions from @{#ZONE_RADIUS} taking into account the own zone format and properties.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE_UNIT ZONE_UNIT
|
||||
--
|
||||
ZONE_UNIT = {
|
||||
@ -751,16 +770,14 @@ end
|
||||
|
||||
--- @type ZONE_GROUP
|
||||
-- @field Wrapper.Group#GROUP ZoneGROUP
|
||||
-- @extends Core.Zone#ZONE_RADIUS
|
||||
-- @extends #ZONE_RADIUS
|
||||
|
||||
|
||||
--- # 5) #ZONE_GROUP class, extends @{Zone#ZONE_RADIUS}
|
||||
--- # ZONE_GROUP class, extends @{Zone#ZONE_RADIUS}
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE_GROUP ZONE_GROUP
|
||||
--
|
||||
ZONE_GROUP = {
|
||||
@ -818,16 +835,16 @@ end
|
||||
|
||||
--- @type ZONE_POLYGON_BASE
|
||||
-- @field #ZONE_POLYGON_BASE.ListVec2 Polygon The polygon defined by an array of @{DCSTypes#Vec2}.
|
||||
-- @extends Core.Zone#ZONE_BASE
|
||||
-- @extends #ZONE_BASE
|
||||
|
||||
|
||||
--- # 6) ZONE_POLYGON_BASE class, extends @{Zone#ZONE_BASE}
|
||||
--- # ZONE_POLYGON_BASE class, extends @{Zone#ZONE_BASE}
|
||||
--
|
||||
-- The ZONE_POLYGON_BASE 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.
|
||||
-- This class is an abstract BASE class for derived classes, and is not meant to be instantiated.
|
||||
--
|
||||
-- ## 6.1) Zone point randomization
|
||||
-- ## Zone point randomization
|
||||
--
|
||||
-- Various functions exist to find random points within the zone.
|
||||
--
|
||||
@ -835,8 +852,6 @@ end
|
||||
-- * @{#ZONE_POLYGON_BASE.GetRandomPointVec2}(): Return a @{Point#POINT_VEC2} object representing a random 2D point within the zone.
|
||||
-- * @{#ZONE_POLYGON_BASE.GetRandomPointVec3}(): Return a @{Point#POINT_VEC3} object representing a random 3D point at landheight within the zone.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE_POLYGON_BASE ZONE_POLYGON_BASE
|
||||
--
|
||||
ZONE_POLYGON_BASE = {
|
||||
@ -870,6 +885,17 @@ function ZONE_POLYGON_BASE:New( ZoneName, PointsArray )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Returns the center location of the polygon.
|
||||
-- @param #ZONE_GROUP self
|
||||
-- @return Dcs.DCSTypes#Vec2 The location of the zone based on the @{Group} location.
|
||||
function ZONE_POLYGON_BASE:GetVec2()
|
||||
self:F( self.ZoneName )
|
||||
|
||||
local Bounds = self:GetBoundingSquare()
|
||||
|
||||
return { x = ( Bounds.x2 + Bounds.x1 ) / 2, y = ( Bounds.y2 + Bounds.y1 ) / 2 }
|
||||
end
|
||||
|
||||
--- Flush polygon coordinates as a table in DCS.log.
|
||||
-- @param #ZONE_POLYGON_BASE self
|
||||
-- @return #ZONE_POLYGON_BASE self
|
||||
@ -1073,16 +1099,14 @@ end
|
||||
|
||||
|
||||
--- @type ZONE_POLYGON
|
||||
-- @extends Core.Zone#ZONE_POLYGON_BASE
|
||||
-- @extends #ZONE_POLYGON_BASE
|
||||
|
||||
|
||||
--- # 7) ZONE_POLYGON class, extends @{Zone#ZONE_POLYGON_BASE}
|
||||
--- # ZONE_POLYGON class, extends @{Zone#ZONE_POLYGON_BASE}
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #ZONE_POLYGON ZONE_POLYGON
|
||||
--
|
||||
ZONE_POLYGON = {
|
||||
|
||||
@ -1,3 +1,70 @@
|
||||
--- The main include file for the MOOSE system.
|
||||
-- Test of permissions
|
||||
|
||||
--- Core Routines
|
||||
Include.File( "Utilities/Routines" )
|
||||
Include.File( "Utilities/Utils" )
|
||||
|
||||
--- Core Classes
|
||||
Include.File( "Core/Base" )
|
||||
Include.File( "Core/Scheduler" )
|
||||
Include.File( "Core/ScheduleDispatcher")
|
||||
Include.File( "Core/Event" )
|
||||
Include.File( "Core/Menu" )
|
||||
Include.File( "Core/Zone" )
|
||||
Include.File( "Core/Database" )
|
||||
Include.File( "Core/Set" )
|
||||
Include.File( "Core/Point" )
|
||||
Include.File( "Core/Message" )
|
||||
Include.File( "Core/Fsm" )
|
||||
Include.File( "Core/Radio" )
|
||||
|
||||
--- Wrapper Classes
|
||||
Include.File( "Wrapper/Object" )
|
||||
Include.File( "Wrapper/Identifiable" )
|
||||
Include.File( "Wrapper/Positionable" )
|
||||
Include.File( "Wrapper/Controllable" )
|
||||
Include.File( "Wrapper/Group" )
|
||||
Include.File( "Wrapper/Unit" )
|
||||
Include.File( "Wrapper/Client" )
|
||||
Include.File( "Wrapper/Static" )
|
||||
Include.File( "Wrapper/Airbase" )
|
||||
Include.File( "Wrapper/Scenery" )
|
||||
|
||||
--- Functional Classes
|
||||
Include.File( "Functional/Scoring" )
|
||||
Include.File( "Functional/CleanUp" )
|
||||
Include.File( "Functional/Spawn" )
|
||||
Include.File( "Functional/Movement" )
|
||||
Include.File( "Functional/Sead" )
|
||||
Include.File( "Functional/Escort" )
|
||||
Include.File( "Functional/MissileTrainer" )
|
||||
Include.File( "Functional/AirbasePolice" )
|
||||
Include.File( "Functional/Detection" )
|
||||
|
||||
--- AI Classes
|
||||
Include.File( "AI/AI_Balancer" )
|
||||
Include.File( "AI/AI_Patrol" )
|
||||
Include.File( "AI/AI_Cap" )
|
||||
Include.File( "AI/AI_Cas" )
|
||||
Include.File( "AI/AI_Cargo" )
|
||||
|
||||
--- Actions
|
||||
Include.File( "Actions/Act_Assign" )
|
||||
Include.File( "Actions/Act_Route" )
|
||||
Include.File( "Actions/Act_Account" )
|
||||
Include.File( "Actions/Act_Assist" )
|
||||
|
||||
--- Task Handling Classes
|
||||
Include.File( "Tasking/CommandCenter" )
|
||||
Include.File( "Tasking/Mission" )
|
||||
Include.File( "Tasking/Task" )
|
||||
Include.File( "Tasking/DetectionManager" )
|
||||
Include.File( "Tasking/Task_A2G_Dispatcher")
|
||||
Include.File( "Tasking/Task_A2G" )
|
||||
Include.File( "Tasking/Task_CARGO" )
|
||||
|
||||
|
||||
-- The order of the declarations is important here. Don't touch it.
|
||||
|
||||
--- Declare the event dispatcher based on the EVENT class
|
||||
@ -7,7 +74,7 @@ _EVENTDISPATCHER = EVENT:New() -- Core.Event#EVENT
|
||||
_SCHEDULEDISPATCHER = SCHEDULEDISPATCHER:New() -- Core.Timer#SCHEDULEDISPATCHER
|
||||
|
||||
--- Declare the main database object, which is used internally by the MOOSE classes.
|
||||
_DATABASE = DATABASE:New() -- Database#DATABASE
|
||||
_DATABASE = DATABASE:New() -- Core.Database#DATABASE
|
||||
|
||||
|
||||
|
||||
|
||||
575
Moose Development/Moose/Tasking/Task_CARGO.lua
Normal file
575
Moose Development/Moose/Tasking/Task_CARGO.lua
Normal file
@ -0,0 +1,575 @@
|
||||
--- **Tasking (Release 2.1)** -- The TASK_CARGO models tasks for players to transport @{Cargo}.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- Cargo are units or cargo objects within DCS world that allow to be transported or sling loaded by other units.
|
||||
-- The CARGO class, as part of the moose core, is able to Board, Load, UnBoard and UnLoad from Carrier units.
|
||||
-- This collection of classes in this module define tasks for human players to handle cargo objects.
|
||||
-- Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.
|
||||
--
|
||||
-- The following classes are important to consider:
|
||||
--
|
||||
-- * @{#TASK_CARGO_TRANSPORT}: Defines a task for a human player to transport a set of cargo between various zones.
|
||||
--
|
||||
-- ==
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- 2017-03-09: Revised version.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Concept, Design & Programming.
|
||||
--
|
||||
-- @module Task_CARGO
|
||||
|
||||
do -- TASK_CARGO
|
||||
|
||||
--- @type TASK_CARGO
|
||||
-- @extends Tasking.Task#TASK
|
||||
|
||||
---
|
||||
-- # TASK_CARGO class, extends @{Task#TASK}
|
||||
--
|
||||
-- The TASK_CARGO class defines @{Cargo} transport tasks,
|
||||
-- based on the tasking capabilities defined in @{Task#TASK}.
|
||||
-- The TASK_CARGO is implemented using a @{Statemachine#FSM_TASK}, and has the following statuses:
|
||||
--
|
||||
-- * **None**: Start of the process.
|
||||
-- * **Planned**: The cargo task is planned.
|
||||
-- * **Assigned**: The cargo task is assigned to a @{Group#GROUP}.
|
||||
-- * **Success**: The cargo task is successfully completed.
|
||||
-- * **Failed**: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
|
||||
--
|
||||
-- # 1.1) Set the scoring of achievements in a cargo task.
|
||||
--
|
||||
-- Scoring or penalties can be given in the following circumstances:
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @field #TASK_CARGO TASK_CARGO
|
||||
--
|
||||
TASK_CARGO = {
|
||||
ClassName = "TASK_CARGO",
|
||||
}
|
||||
|
||||
--- Instantiates a new TASK_CARGO.
|
||||
-- @param #TASK_CARGO self
|
||||
-- @param Tasking.Mission#MISSION Mission
|
||||
-- @param Set#SET_GROUP SetGroup The set of groups for which the Task can be assigned.
|
||||
-- @param #string TaskName The name of the Task.
|
||||
-- @param Core.Set#SET_CARGO SetCargo The scope of the cargo to be transported.
|
||||
-- @param #string TaskType The type of Cargo task.
|
||||
-- @return #TASK_CARGO self
|
||||
function TASK_CARGO:New( Mission, SetGroup, TaskName, SetCargo, TaskType )
|
||||
local self = BASE:Inherit( self, TASK:New( Mission, SetGroup, TaskName, TaskType ) ) -- #TASK_CARGO
|
||||
self:F( {Mission, SetGroup, TaskName, SetCargo, TaskType})
|
||||
|
||||
self.SetCargo = SetCargo
|
||||
self.TaskType = TaskType
|
||||
|
||||
self.DeployZones = {} -- setmetatable( {}, { __mode = "v" } ) -- weak table on value
|
||||
|
||||
Mission:AddTask( self )
|
||||
|
||||
local Fsm = self:GetUnitProcess()
|
||||
|
||||
|
||||
Fsm:AddProcess ( "Planned", "Accept", ACT_ASSIGN_ACCEPT:New( self.TaskBriefing ), { Assigned = "SelectAction", Rejected = "Reject" } )
|
||||
|
||||
Fsm:AddTransition( "*", "SelectAction", "WaitingForCommand" )
|
||||
|
||||
Fsm:AddTransition( "WaitingForCommand", "RouteToPickup", "RoutingToPickup" )
|
||||
Fsm:AddProcess ( "RoutingToPickup", "RouteToPickupPoint", ACT_ROUTE_POINT:New(), { Arrived = "ArriveAtPickup" } )
|
||||
Fsm:AddTransition( "Arrived", "ArriveAtPickup", "ArrivedAtPickup" )
|
||||
|
||||
Fsm:AddTransition( "WaitingForCommand", "RouteToDeploy", "RoutingToDeploy" )
|
||||
Fsm:AddProcess ( "RoutingToDeploy", "RouteToDeployZone", ACT_ROUTE_ZONE:New(), { Arrived = "ArriveAtDeploy" } )
|
||||
Fsm:AddTransition( "Arrived", "ArriveAtDeploy", "ArrivedAtDeploy" )
|
||||
|
||||
Fsm:AddTransition( { "ArrivedAtPickup", "ArrivedAtDeploy" }, "Land", "Landing" )
|
||||
Fsm:AddTransition( "Landing", "Landed", "Landed" )
|
||||
|
||||
Fsm:AddTransition( "WaitingForCommand", "PrepareBoarding", "AwaitBoarding" )
|
||||
Fsm:AddTransition( "AwaitBoarding", "Board", "Boarding" )
|
||||
Fsm:AddTransition( "Boarding", "Boarded", "Boarded" )
|
||||
|
||||
Fsm:AddTransition( "WaitingForCommand", "PrepareUnBoarding", "AwaitUnBoarding" )
|
||||
Fsm:AddTransition( "AwaitUnBoarding", "UnBoard", "UnBoarding" )
|
||||
Fsm:AddTransition( "UnBoarding", "UnBoarded", "UnBoarded" )
|
||||
|
||||
|
||||
Fsm:AddTransition( "Deployed", "Success", "Success" )
|
||||
Fsm:AddTransition( "Rejected", "Reject", "Aborted" )
|
||||
Fsm:AddTransition( "Failed", "Fail", "Failed" )
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnEnterWaitingForCommand( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
TaskUnit.Menu = MENU_GROUP:New( TaskUnit:GetGroup(), Task:GetName() .. " @ " .. TaskUnit:GetName() )
|
||||
|
||||
Task.SetCargo:ForEachCargo(
|
||||
|
||||
--- @param AI.AI_Cargo#AI_CARGO Cargo
|
||||
function( Cargo )
|
||||
if Cargo:IsUnLoaded() then
|
||||
if Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
MENU_GROUP_COMMAND:New(
|
||||
TaskUnit:GetGroup(),
|
||||
"Pickup cargo " .. Cargo.Name,
|
||||
TaskUnit.Menu,
|
||||
self.MenuBoardCargo,
|
||||
self,
|
||||
Cargo
|
||||
)
|
||||
else
|
||||
MENU_GROUP_COMMAND:New(
|
||||
TaskUnit:GetGroup(),
|
||||
"Route to cargo " .. Cargo.Name,
|
||||
TaskUnit.Menu,
|
||||
self.MenuRouteToPickup,
|
||||
self,
|
||||
Cargo
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if Cargo:IsLoaded() then
|
||||
for DeployZoneName, DeployZone in pairs( Task.DeployZones ) do
|
||||
if Cargo:IsInZone( DeployZone ) then
|
||||
MENU_GROUP_COMMAND:New(
|
||||
TaskUnit:GetGroup(),
|
||||
"Deploy cargo " .. Cargo.Name,
|
||||
TaskUnit.Menu,
|
||||
self.MenuUnBoardCargo,
|
||||
self,
|
||||
Cargo
|
||||
)
|
||||
else
|
||||
MENU_GROUP_COMMAND:New(
|
||||
TaskUnit:GetGroup(),
|
||||
"Route to deploy zone " .. DeployZoneName,
|
||||
TaskUnit.Menu,
|
||||
self.MenuRouteToDeploy,
|
||||
self,
|
||||
DeployZone
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnLeaveWaitingForCommand( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
TaskUnit.Menu:Remove()
|
||||
end
|
||||
|
||||
function Fsm:MenuBoardCargo( Cargo )
|
||||
self:__PrepareBoarding( 1.0, Cargo )
|
||||
end
|
||||
|
||||
function Fsm:MenuUnBoardCargo( Cargo )
|
||||
self:__PrepareUnBoarding( 1.0, Cargo )
|
||||
end
|
||||
|
||||
function Fsm:MenuRouteToPickup( Cargo )
|
||||
self:__RouteToPickup( 1.0, Cargo )
|
||||
end
|
||||
|
||||
function Fsm:MenuRouteToDeploy( DeployZone )
|
||||
self:__RouteToDeploy( 1.0, DeployZone )
|
||||
end
|
||||
|
||||
--- Route to Cargo
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:onafterRouteToPickup( TaskUnit, Task, From, Event, To, Cargo )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
|
||||
self.Cargo = Cargo
|
||||
Task:SetCargoPickup( self.Cargo, TaskUnit )
|
||||
self:__RouteToPickupPoint( 0.1 )
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:onafterArriveAtPickup( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
if TaskUnit:IsAir() then
|
||||
self:__Land( -0.1 )
|
||||
else
|
||||
self:__SelectAction( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Route to DeployZone
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
function Fsm:onafterRouteToDeploy( TaskUnit, Task, From, Event, To, DeployZone )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
|
||||
self.DeployZone = DeployZone
|
||||
Task:SetDeployZone( self.DeployZone, TaskUnit )
|
||||
self:__RouteToDeployZone( 0.1 )
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:onafterArriveAtDeploy( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
if TaskUnit:IsAir() then
|
||||
self:__Land( -0.1 )
|
||||
else
|
||||
self:__SelectAction( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterLand( TaskUnit, Task, From, Event, To )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
if TaskUnit:InAir() then
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Land", TaskUnit:GetGroup(), "Land" )
|
||||
self:__Land( -10 )
|
||||
else
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Landed ...", TaskUnit:GetGroup(), "Land" )
|
||||
self:__Landed( -0.1 )
|
||||
end
|
||||
else
|
||||
self:__ArriveAtCargo( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterLanded( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
if TaskUnit:InAir() then
|
||||
self:__Land( -0.1 )
|
||||
else
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Preparing to board in 10 seconds ...", TaskUnit:GetGroup(), "Boarding" )
|
||||
self:__PrepareBoarding( -10 )
|
||||
end
|
||||
else
|
||||
self:__ArriveAtCargo( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterPrepareBoarding( TaskUnit, Task, From, Event, To, Cargo )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
self.Cargo = Cargo
|
||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
if TaskUnit:InAir() then
|
||||
self:__Land( -0.1 )
|
||||
else
|
||||
self:__Board( -0.1 )
|
||||
end
|
||||
else
|
||||
self:__ArriveAtCargo( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterBoard( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
function self.Cargo:OnEnterLoaded( From, Event, To, TaskUnit, TaskProcess )
|
||||
|
||||
self:E({From, Event, To, TaskUnit, TaskProcess })
|
||||
|
||||
TaskProcess:__Boarded( 0.1 )
|
||||
|
||||
end
|
||||
|
||||
|
||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
if TaskUnit:InAir() then
|
||||
self:__Land( -0.1 )
|
||||
else
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Boarding ...", TaskUnit:GetGroup(), "Boarding" )
|
||||
self.Cargo:Board( TaskUnit, self )
|
||||
end
|
||||
else
|
||||
self:__ArriveAtCargo( -0.1 )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterBoarded( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Boarded ...", TaskUnit:GetGroup(), "Boarding" )
|
||||
self:__SelectAction( 1 )
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterPrepareUnBoarding( TaskUnit, Task, From, Event, To, Cargo, DeployZone )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
self.DeployZone = DeployZone
|
||||
self.Cargo:__UnBoard( -0.1, DeployZone )
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterUnBoard( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
function self.Cargo:OnEnterUnLoaded( From, Event, To, TaskUnit, TaskProcess )
|
||||
|
||||
self:E({From, Event, To, TaskUnit, TaskProcess })
|
||||
|
||||
TaskProcess:__UnBoarded( 0.1 )
|
||||
|
||||
end
|
||||
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "UnBoarding ...", TaskUnit:GetGroup(), "UnBoarding" )
|
||||
self.Cargo:__UnBoard( -0.1, self.DeployZone )
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_CARGO#TASK_CARGO Task
|
||||
function Fsm:OnAfterUnBoarded( TaskUnit, Task )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "UnBoarded ...", TaskUnit:GetGroup(), "UnBoarding" )
|
||||
self:__SelectAction( 1 )
|
||||
end
|
||||
|
||||
|
||||
return self
|
||||
|
||||
end
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
function TASK_CARGO:GetPlannedMenuText()
|
||||
return self:GetStateString() .. " - " .. self:GetTaskName() .. " ( " .. self.TargetSetUnit:GetUnitTypesText() .. " )"
|
||||
end
|
||||
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param AI.AI_Cargo#AI_CARGO Cargo The cargo.
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetCargoPickup( Cargo, TaskUnit )
|
||||
|
||||
self:F({Cargo, TaskUnit})
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
local ActRouteCargo = ProcessUnit:GetProcess( "RoutingToPickup", "RouteToPickupPoint" ) -- Actions.Act_Route#ACT_ROUTE_POINT
|
||||
ActRouteCargo:SetPointVec2( Cargo:GetPointVec2() )
|
||||
ActRouteCargo:SetRange( Cargo:GetBoardingRange() )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param Core.Zone#ZONE DeployZone
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetDeployZone( DeployZone, TaskUnit )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
local ActRouteDeployZone = ProcessUnit:GetProcess( "RoutingToDeploy", "RouteToDeployZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
ActRouteDeployZone:SetZone( DeployZone )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param Core.Zone#ZONE DeployZone
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:AddDeployZone( DeployZone, TaskUnit )
|
||||
|
||||
self.DeployZones[DeployZone:GetName()] = DeployZone
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param Core.Zone#ZONE DeployZone
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:RemoveDeployZone( DeployZone, TaskUnit )
|
||||
|
||||
self.DeployZones[DeployZone:GetName()] = nil
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param @list<Core.Zone#ZONE> DeployZones
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetDeployZones( DeployZones, TaskUnit )
|
||||
|
||||
for DeployZoneID, DeployZone in pairs( DeployZones ) do
|
||||
self.DeployZones[DeployZone:GetName()] = DeployZone
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- @param #TASK_CARGO self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return Core.Zone#ZONE_BASE The Zone object where the Target is located on the map.
|
||||
function TASK_CARGO:GetTargetZone( TaskUnit )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
local ActRouteTarget = ProcessUnit:GetProcess( "Engaging", "RouteToTargetZone" ) -- Actions.Act_Route#ACT_ROUTE_ZONE
|
||||
return ActRouteTarget:GetZone()
|
||||
end
|
||||
|
||||
--- Set a score when a target in scope of the A2G attack, has been destroyed .
|
||||
-- @param #TASK_CARGO self
|
||||
-- @param #string Text The text to display to the player, when the target has been destroyed.
|
||||
-- @param #number Score The score in points.
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetScoreOnDestroy( Text, Score, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
ProcessUnit:AddScoreProcess( "Engaging", "Account", "Account", Text, Score )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a score when all the targets in scope of the A2G attack, have been destroyed.
|
||||
-- @param #TASK_CARGO self
|
||||
-- @param #string Text The text to display to the player, when all targets hav been destroyed.
|
||||
-- @param #number Score The score in points.
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetScoreOnSuccess( Text, Score, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
ProcessUnit:AddScore( "Success", Text, Score )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set a penalty when the A2G attack has failed.
|
||||
-- @param #TASK_CARGO self
|
||||
-- @param #string Text The text to display to the player, when the A2G attack has failed.
|
||||
-- @param #number Penalty The penalty in points.
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @return #TASK_CARGO
|
||||
function TASK_CARGO:SetPenaltyOnFailed( Text, Penalty, TaskUnit )
|
||||
self:F( { Text, Score, TaskUnit } )
|
||||
|
||||
local ProcessUnit = self:GetUnitProcess( TaskUnit )
|
||||
|
||||
ProcessUnit:AddScore( "Failed", Text, Penalty )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
do -- TASK_CARGO_TRANSPORT
|
||||
|
||||
--- The TASK_CARGO_TRANSPORT class
|
||||
-- @type TASK_CARGO_TRANSPORT
|
||||
-- @extends #TASK_CARGO
|
||||
TASK_CARGO_TRANSPORT = {
|
||||
ClassName = "TASK_CARGO_TRANSPORT",
|
||||
}
|
||||
|
||||
--- Instantiates a new TASK_CARGO_TRANSPORT.
|
||||
-- @param #TASK_CARGO_TRANSPORT self
|
||||
-- @param Tasking.Mission#MISSION Mission
|
||||
-- @param Set#SET_GROUP SetGroup The set of groups for which the Task can be assigned.
|
||||
-- @param #string TaskName The name of the Task.
|
||||
-- @param Core.Set#SET_CARGO SetCargo The scope of the cargo to be transported.
|
||||
-- @return #TASK_CARGO_TRANSPORT self
|
||||
function TASK_CARGO_TRANSPORT:New( Mission, SetGroup, TaskName, SetCargo )
|
||||
local self = BASE:Inherit( self, TASK_CARGO:New( Mission, SetGroup, TaskName, SetCargo, "Transport" ) ) -- #TASK_CARGO_TRANSPORT
|
||||
self:F()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170328_0728' )
|
||||
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
|
||||
Include.File = function( IncludeFile )
|
||||
if not Include.Files[ IncludeFile ] then
|
||||
Include.Files[IncludeFile] = IncludeFile
|
||||
env.info( "Include:" .. IncludeFile .. " from " .. Include.ProgramPath )
|
||||
local f = assert( base.loadfile( Include.ProgramPath .. IncludeFile .. ".lua" ) )
|
||||
if f == nil then
|
||||
error ("Could not load MOOSE file " .. IncludeFile .. ".lua" )
|
||||
else
|
||||
env.info( "Include:" .. IncludeFile .. " loaded from " .. Include.ProgramPath )
|
||||
return f()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Include.ProgramPath = "Scripts/Moose/"
|
||||
|
||||
env.info( "Include.ProgramPath = " .. Include.ProgramPath)
|
||||
|
||||
Include.Files = {}
|
||||
|
||||
Include.File( "Moose" )
|
||||
|
||||
BASE:TraceOnOff( true )
|
||||
env.info( '*** MOOSE INCLUDE END *** ' )
|
||||
@ -1,75 +0,0 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170412_0926' )
|
||||
|
||||
local base = _G
|
||||
|
||||
__Moose = {}
|
||||
|
||||
__Moose.Include = function( IncludeFile )
|
||||
if not __Moose.Includes[ IncludeFile ] then
|
||||
__Moose.Includes[IncludeFile] = IncludeFile
|
||||
local f = assert( base.loadfile( __Moose.ProgramPath .. IncludeFile ) )
|
||||
if f == nil then
|
||||
error ("Moose: Could not load Moose file " .. IncludeFile )
|
||||
else
|
||||
env.info( "Moose: " .. IncludeFile .. " dynamically loaded from " .. __Moose.ProgramPath )
|
||||
return f()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
__Moose.ProgramPath = "Scripts/Moose/"
|
||||
|
||||
__Moose.Includes = {}
|
||||
__Moose.Include( 'Utilities/Routines.lua' )
|
||||
__Moose.Include( 'Utilities/Utils.lua' )
|
||||
__Moose.Include( 'Core/Base.lua' )
|
||||
__Moose.Include( 'Core/Scheduler.lua' )
|
||||
__Moose.Include( 'Core/ScheduleDispatcher.lua' )
|
||||
__Moose.Include( 'Core/Event.lua' )
|
||||
__Moose.Include( 'Core/Menu.lua' )
|
||||
__Moose.Include( 'Core/Zone.lua' )
|
||||
__Moose.Include( 'Core/Database.lua' )
|
||||
__Moose.Include( 'Core/Set.lua' )
|
||||
__Moose.Include( 'Core/Point.lua' )
|
||||
__Moose.Include( 'Core/Message.lua' )
|
||||
__Moose.Include( 'Core/Fsm.lua' )
|
||||
__Moose.Include( 'Core/Radio.lua' )
|
||||
__Moose.Include( 'Core/SpawnStatic.lua' )
|
||||
__Moose.Include( 'Wrapper/Object.lua' )
|
||||
__Moose.Include( 'Wrapper/Identifiable.lua' )
|
||||
__Moose.Include( 'Wrapper/Positionable.lua' )
|
||||
__Moose.Include( 'Wrapper/Controllable.lua' )
|
||||
__Moose.Include( 'Wrapper/Group.lua' )
|
||||
__Moose.Include( 'Wrapper/Unit.lua' )
|
||||
__Moose.Include( 'Wrapper/Client.lua' )
|
||||
__Moose.Include( 'Wrapper/Static.lua' )
|
||||
__Moose.Include( 'Wrapper/Airbase.lua' )
|
||||
__Moose.Include( 'Wrapper/Scenery.lua' )
|
||||
__Moose.Include( 'Functional/Scoring.lua' )
|
||||
__Moose.Include( 'Functional/CleanUp.lua' )
|
||||
__Moose.Include( 'Functional/Spawn.lua' )
|
||||
__Moose.Include( 'Functional/Movement.lua' )
|
||||
__Moose.Include( 'Functional/Sead.lua' )
|
||||
__Moose.Include( 'Functional/Escort.lua' )
|
||||
__Moose.Include( 'Functional/MissileTrainer.lua' )
|
||||
__Moose.Include( 'Functional/AirbasePolice.lua' )
|
||||
__Moose.Include( 'Functional/Detection.lua' )
|
||||
__Moose.Include( 'AI/AI_Balancer.lua' )
|
||||
__Moose.Include( 'AI/AI_Patrol.lua' )
|
||||
__Moose.Include( 'AI/AI_Cap.lua' )
|
||||
__Moose.Include( 'AI/AI_Cas.lua' )
|
||||
__Moose.Include( 'AI/AI_Cargo.lua' )
|
||||
__Moose.Include( 'Actions/Act_Assign.lua' )
|
||||
__Moose.Include( 'Actions/Act_Route.lua' )
|
||||
__Moose.Include( 'Actions/Act_Account.lua' )
|
||||
__Moose.Include( 'Actions/Act_Assist.lua' )
|
||||
__Moose.Include( 'Tasking/CommandCenter.lua' )
|
||||
__Moose.Include( 'Tasking/Mission.lua' )
|
||||
__Moose.Include( 'Tasking/Task.lua' )
|
||||
__Moose.Include( 'Tasking/DetectionManager.lua' )
|
||||
__Moose.Include( 'Tasking/Task_A2G_Dispatcher.lua' )
|
||||
__Moose.Include( 'Tasking/Task_A2G.lua' )
|
||||
__Moose.Include( 'Moose.lua' )
|
||||
BASE:TraceOnOff( true )
|
||||
env.info( '*** MOOSE INCLUDE END *** ' )
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -116,60 +117,7 @@
|
||||
<li>AI<em>CARGO</em>GROUPED, represented by a Group of CARGO_UNITs.</li>
|
||||
</ul>
|
||||
|
||||
<h1>1) <a href="##(AI_CARGO)">#AI_CARGO</a> class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
|
||||
<p>The <a href="##(AI_CARGO)">#AI_CARGO</a> 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.</p>
|
||||
|
||||
<p>The AI<em>CARGO is a state machine: it manages the different events and states of the cargo.
|
||||
All derived classes from AI</em>CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.</p>
|
||||
|
||||
<h2>1.2.1) AI_CARGO Events:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI_CARGO).Board">AI_CARGO.Board</a>( ToCarrier ): Boards the cargo to a carrier.</li>
|
||||
<li><a href="##(AI_CARGO).Load">AI_CARGO.Load</a>( ToCarrier ): Loads the cargo into a carrier, regardless of its position.</li>
|
||||
<li><a href="##(AI_CARGO).UnBoard">AI_CARGO.UnBoard</a>( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.</li>
|
||||
<li><a href="##(AI_CARGO).UnLoad">AI_CARGO.UnLoad</a>( ToPointVec2 ): UnLoads the cargo from a carrier.</li>
|
||||
<li><a href="##(AI_CARGO).Dead">AI_CARGO.Dead</a>( Controllable ): The cargo is dead. The cargo process will be ended.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2.2) AI_CARGO States:</h2>
|
||||
|
||||
<ul>
|
||||
<li><strong>UnLoaded</strong>: The cargo is unloaded from a carrier.</li>
|
||||
<li><strong>Boarding</strong>: The cargo is currently boarding (= running) into a carrier.</li>
|
||||
<li><strong>Loaded</strong>: The cargo is loaded into a carrier.</li>
|
||||
<li><strong>UnBoarding</strong>: The cargo is currently unboarding (=running) from a carrier.</li>
|
||||
<li><strong>Dead</strong>: The cargo is dead ...</li>
|
||||
<li><strong>End</strong>: The process has come to an end.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2.3) AI_CARGO state transition methods:</h2>
|
||||
|
||||
<p>State transition functions can be set <strong>by the mission designer</strong> customizing or improving the behaviour of the state.
|
||||
There are 2 moments when state transition methods will be called by the state machine:</p>
|
||||
|
||||
<ul>
|
||||
<li><p><strong>Leaving</strong> the state.
|
||||
The state transition method needs to start with the name <strong>OnLeave + the name of the state</strong>.
|
||||
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!</p></li>
|
||||
<li><p><strong>Entering</strong> the state.
|
||||
The state transition method needs to start with the name <strong>OnEnter + the name of the state</strong>.
|
||||
These state transition methods need to provide a return value, which is specified at the function description.</p></li>
|
||||
</ul>
|
||||
|
||||
<h1>2) #AI<em>CARGO</em>UNIT class</h1>
|
||||
|
||||
<p>The AI<em>CARGO</em>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<em>CARGO</em>UNIT objects to and from carriers.</p>
|
||||
|
||||
<h1>5) #AI<em>CARGO</em>GROUPED class</h1>
|
||||
|
||||
<p>The AI<em>CARGO</em>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<em>CARGO</em>UNIT objects to and from carriers.</p>
|
||||
|
||||
<p>This module is still under construction, but is described above works already, and will keep working ...</p>
|
||||
|
||||
@ -179,19 +127,25 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CARGO">AI_CARGO</a></td>
|
||||
<td class="summary">
|
||||
<h1>AI_CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
|
||||
<p>The AI_CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CARGO_GROUP">AI_CARGO_GROUP</a></td>
|
||||
<td class="summary">
|
||||
<h1>AI_CARGO_GROUP class</h1>
|
||||
|
||||
<p>The AI_CARGO_GROUP class defines a cargo that is represented by a group of <a href="Unit.html">Unit</a> objects within the simulator, and can be transported by a carrier.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CARGO_GROUPED">AI_CARGO_GROUPED</a></td>
|
||||
<td class="summary">
|
||||
<h1>AI_CARGO_GROUPED class</h1>
|
||||
|
||||
<p>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.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -209,7 +163,9 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#AI_CARGO_UNIT">AI_CARGO_UNIT</a></td>
|
||||
<td class="summary">
|
||||
<h1>AI_CARGO_UNIT class, extends <a href="##(AI_CARGO_REPRESENTABLE)">#AI<em>CARGO</em>REPRESENTABLE</a></h1>
|
||||
|
||||
<p>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.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -237,24 +193,66 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).CargoObject">AI_CARGO.CargoObject</a></td>
|
||||
<td class="summary">
|
||||
<p>The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).ClassName">AI_CARGO.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).Containable">AI_CARGO.Containable</a></td>
|
||||
<td class="summary">
|
||||
<p>This flag defines if the cargo can be contained within a DCS Unit.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).GetBoardingRange">AI_CARGO:GetBoardingRange()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the range till cargo will board.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).GetName">AI_CARGO:GetName()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the name of the Cargo.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).GetPointVec2">AI_CARGO:GetPointVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the current PointVec2 of the cargo.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).GetType">AI_CARGO:GetType()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the type of the Cargo.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).IsInRadius">AI_CARGO:IsInRadius(PointVec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if CargoCarrier is in the radius for the Cargo to be Loaded.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).IsInZone">AI_CARGO:IsInZone(Zone)</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if Cargo is the given <a href="Zone.html">Zone</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).IsLoaded">AI_CARGO:IsLoaded()</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if cargo is loaded.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).IsNear">AI_CARGO:IsNear(PointVec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if CargoCarrier is near the Cargo to be Loaded.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO).IsUnLoaded">AI_CARGO:IsUnLoaded()</a></td>
|
||||
<td class="summary">
|
||||
<p>Check if cargo is unloaded.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -415,12 +413,6 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_GROUP).CargoSet">AI_CARGO_GROUP.CargoSet</a></td>
|
||||
<td class="summary">
|
||||
<p>A set of cargo objects.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_GROUP).ClassName">AI_CARGO_GROUP.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -440,12 +432,6 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
<h2><a id="#(AI_CARGO_GROUPED)">Type <code>AI_CARGO_GROUPED</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_GROUPED).ClassName">AI_CARGO_GROUPED.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_GROUPED).New">AI_CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)</a></td>
|
||||
<td class="summary">
|
||||
<p>AI<em>CARGO</em>GROUPED constructor.</p>
|
||||
@ -608,9 +594,9 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).ClassName">AI_CARGO_UNIT.ClassName</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).Destroy">AI_CARGO_UNIT:Destroy()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>AI<em>CARGO</em>UNIT Destructor.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -626,7 +612,7 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onafterBoard">AI_CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onafterBoard">AI_CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Board Event.</p>
|
||||
</td>
|
||||
@ -638,7 +624,7 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onenterBoarding">AI_CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onenterBoarding">AI_CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Enter Boarding State.</p>
|
||||
</td>
|
||||
@ -662,7 +648,7 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onleaveBoarding">AI_CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CARGO_UNIT).onleaveBoarding">AI_CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Leave Boarding State.</p>
|
||||
</td>
|
||||
@ -686,6 +672,52 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AI_CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
|
||||
|
||||
<p>The AI_CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
|
||||
|
||||
|
||||
<p>A cargo is a logical object defined that is available for transport, and has a life status within a simulation.</p>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
<h2>AI_CARGO Events:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(AI)">#AI</a>( ToCarrier ): Boards the cargo to a carrier.</li>
|
||||
<li><a href="##(AI)">#AI</a>( ToCarrier ): Loads the cargo into a carrier, regardless of its position.</li>
|
||||
<li><a href="##(AI)">#AI</a>( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.</li>
|
||||
<li><a href="##(AI)">#AI</a>( ToPointVec2 ): UnLoads the cargo from a carrier.</li>
|
||||
<li><a href="##(AI)">#AI</a>( Controllable ): The cargo is dead. The cargo process will be ended.</li>
|
||||
</ul>
|
||||
|
||||
<h2>AI_CARGO States:</h2>
|
||||
|
||||
<ul>
|
||||
<li><strong>UnLoaded</strong>: The cargo is unloaded from a carrier.</li>
|
||||
<li><strong>Boarding</strong>: The cargo is currently boarding (= running) into a carrier.</li>
|
||||
<li><strong>Loaded</strong>: The cargo is loaded into a carrier.</li>
|
||||
<li><strong>UnBoarding</strong>: The cargo is currently unboarding (=running) from a carrier.</li>
|
||||
<li><strong>Dead</strong>: The cargo is dead ...</li>
|
||||
<li><strong>End</strong>: The process has come to an end.</li>
|
||||
</ul>
|
||||
|
||||
<h2>AI_CARGO state transition methods:</h2>
|
||||
|
||||
<p>State transition functions can be set <strong>by the mission designer</strong> customizing or improving the behaviour of the state.
|
||||
There are 2 moments when state transition methods will be called by the state machine:</p>
|
||||
|
||||
<ul>
|
||||
<li><p><strong>Leaving</strong> the state.
|
||||
The state transition method needs to start with the name <strong>OnLeave + the name of the state</strong>.
|
||||
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!</p></li>
|
||||
<li><p><strong>Entering</strong> the state.
|
||||
The state transition method needs to start with the name <strong>OnEnter + the name of the state</strong>.
|
||||
These state transition methods need to provide a return value, which is specified at the function description.</p></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -700,6 +732,12 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AI_CARGO_GROUP class</h1>
|
||||
|
||||
<p>The AI_CARGO_GROUP class defines a cargo that is represented by a group of <a href="Unit.html">Unit</a> objects within the simulator, and can be transported by a carrier.</p>
|
||||
|
||||
|
||||
<p>Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_GROUP to and from carrier.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -714,6 +752,12 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AI_CARGO_GROUPED class</h1>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
|
||||
<p>Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers.</p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -756,6 +800,14 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>AI_CARGO_UNIT class, extends <a href="##(AI_CARGO_REPRESENTABLE)">#AI<em>CARGO</em>REPRESENTABLE</a></h1>
|
||||
|
||||
<p>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.</p>
|
||||
|
||||
|
||||
<p>Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -830,20 +882,6 @@ The Carrier that will hold the cargo.</p>
|
||||
|
||||
<p>The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CARGO).ClassName" >
|
||||
<strong>AI_CARGO.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -863,6 +901,148 @@ The Carrier that will hold the cargo.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).GetBoardingRange" >
|
||||
<strong>AI_CARGO:GetBoardingRange()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the range till cargo will board.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#number:</em>
|
||||
The range till cargo will board.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).GetName" >
|
||||
<strong>AI_CARGO:GetName()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the name of the Cargo.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the Cargo.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).GetPointVec2" >
|
||||
<strong>AI_CARGO:GetPointVec2()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the current PointVec2 of the cargo.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Core.Point.html##(POINT_VEC2)">Core.Point#POINT_VEC2</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).GetType" >
|
||||
<strong>AI_CARGO:GetType()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Get the type of the Cargo.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The type of the Cargo.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).IsInRadius" >
|
||||
<strong>AI_CARGO:IsInRadius(PointVec2)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Check if CargoCarrier is in the radius for the Cargo to be Loaded.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Point.html##(POINT_VEC2)">Core.Point#POINT_VEC2</a> PointVec2 </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).IsInZone" >
|
||||
<strong>AI_CARGO:IsInZone(Zone)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Check if Cargo is the given <a href="Zone.html">Zone</a>.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> Zone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
<strong>true</strong> if cargo is in the Zone, <strong>false</strong> if cargo is not in the Zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).IsLoaded" >
|
||||
<strong>AI_CARGO:IsLoaded()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Check if cargo is loaded.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if loaded</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).IsNear" >
|
||||
<strong>AI_CARGO:IsNear(PointVec2)</strong>
|
||||
</a>
|
||||
@ -884,6 +1064,24 @@ The Carrier that will hold the cargo.</p>
|
||||
<p><em>#boolean:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO).IsUnLoaded" >
|
||||
<strong>AI_CARGO:IsUnLoaded()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Check if cargo is unloaded.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if unloaded</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1486,20 +1684,6 @@ The amount of seconds to delay the action.</p>
|
||||
|
||||
<p>A set of cargo objects.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CARGO_GROUP).ClassName" >
|
||||
<strong>AI_CARGO_GROUP.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1575,20 +1759,6 @@ The amount of seconds to delay the action.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CARGO_GROUPED).ClassName" >
|
||||
<strong>AI_CARGO_GROUPED.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO_GROUPED).New" >
|
||||
<strong>AI_CARGO_GROUPED:New(CargoSet, Type, Name, Weight, ReportRadius, NearRadius)</strong>
|
||||
</a>
|
||||
@ -2445,6 +2615,7 @@ The UNIT carrying the package.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_CARGO_UNIT).CargoCarrier" >
|
||||
<strong>AI_CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
@ -2486,13 +2657,17 @@ The UNIT carrying the package.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(AI_CARGO_UNIT).ClassName" >
|
||||
<strong>AI_CARGO_UNIT.ClassName</strong>
|
||||
<a id="#(AI_CARGO_UNIT).Destroy" >
|
||||
<strong>AI_CARGO_UNIT:Destroy()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>AI<em>CARGO</em>UNIT Destructor.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(AI_CARGO_UNIT)">#AI<em>CARGO</em>UNIT</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
@ -2567,7 +2742,7 @@ The UNIT carrying the package.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO_UNIT).onafterBoard" >
|
||||
<strong>AI_CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier)</strong>
|
||||
<strong>AI_CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2595,6 +2770,11 @@ The UNIT carrying the package.</p>
|
||||
|
||||
<p><code><em> CargoCarrier </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2639,7 +2819,7 @@ The UNIT carrying the package.</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO_UNIT).onenterBoarding" >
|
||||
<strong>AI_CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier)</strong>
|
||||
<strong>AI_CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2667,6 +2847,11 @@ The UNIT carrying the package.</p>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> CargoCarrier </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -2789,7 +2974,7 @@ Point#POINT_VEC2</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CARGO_UNIT).onleaveBoarding" >
|
||||
<strong>AI_CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier)</strong>
|
||||
<strong>AI_CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -2817,6 +3002,11 @@ Point#POINT_VEC2</p>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> CargoCarrier </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -102,12 +103,14 @@
|
||||
<p>Mission designers can use the DATABASE class to refer to:</p>
|
||||
|
||||
<ul>
|
||||
<li>STATICS</li>
|
||||
<li>UNITS</li>
|
||||
<li>GROUPS</li>
|
||||
<li>CLIENTS</li>
|
||||
<li>AIRPORTS</li>
|
||||
<li>AIRBASES</li>
|
||||
<li>PLAYERSJOINED</li>
|
||||
<li>PLAYERS</li>
|
||||
<li>CARGOS</li>
|
||||
</ul>
|
||||
|
||||
<p>On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.</p>
|
||||
@ -150,9 +153,15 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddAirbase">DATABASE:AddAirbase(DCSAirbaseName)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddAirbase">DATABASE:AddAirbase(AirbaseName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a Airbase based on the Airbase Name in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddCargo">DATABASE:AddCargo(CargoName, Cargo)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a Cargo based on the Cargo Name in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -183,6 +192,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).AddUnit">DATABASE:AddUnit(DCSUnitName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Adds a Unit based on the Unit Name in the DATABASE.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).CARGOS">DATABASE.CARGOS</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -210,9 +225,15 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteAirbase">DATABASE:DeleteAirbase(DCSAirbaseName)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteAirbase">DATABASE:DeleteAirbase(AirbaseName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Deletes a Airbase from the DATABASE based on the Airbase Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).DeleteCargo">DATABASE:DeleteCargo(CargoName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Deletes a Cargo from the DATABASE based on the Cargo Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -236,7 +257,13 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindAirbase">DATABASE:FindAirbase(AirbaseName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a AIRBASE based on the AirbaseName.</p>
|
||||
<p>Finds an AIRBASE based on the AirbaseName.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).FindCargo">DATABASE:FindCargo(CargoName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds an CARGO based on the CargoName.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -267,6 +294,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEach">DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).ForEachCargo">DATABASE:ForEachCargo(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -381,6 +414,18 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).New">DATABASE:New()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).OnEventDeleteCargo">DATABASE:OnEventDeleteCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnEventDeleteCargo.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).OnEventNewCargo">DATABASE:OnEventNewCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnEventNewCargo event.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -539,7 +584,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).AddAirbase" >
|
||||
<strong>DATABASE:AddAirbase(DCSAirbaseName)</strong>
|
||||
<strong>DATABASE:AddAirbase(AirbaseName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -550,7 +595,35 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSAirbaseName </em></code>: </p>
|
||||
<p><code><em>#string AirbaseName </em></code>:
|
||||
The name of the airbase</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).AddCargo" >
|
||||
<strong>DATABASE:AddCargo(CargoName, Cargo)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Adds a Cargo based on the Cargo Name in the DATABASE.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string CargoName </em></code>:
|
||||
The name of the airbase</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> Cargo </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@ -664,6 +737,20 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).CARGOS" >
|
||||
<strong>DATABASE.CARGOS</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -726,7 +813,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).DeleteAirbase" >
|
||||
<strong>DATABASE:DeleteAirbase(DCSAirbaseName)</strong>
|
||||
<strong>DATABASE:DeleteAirbase(AirbaseName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -737,7 +824,30 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> DCSAirbaseName </em></code>: </p>
|
||||
<p><code><em>#string AirbaseName </em></code>:
|
||||
The name of the airbase</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).DeleteCargo" >
|
||||
<strong>DATABASE:DeleteCargo(CargoName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Deletes a Cargo from the DATABASE based on the Cargo Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string CargoName </em></code>:
|
||||
The name of the airbase</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@ -815,7 +925,7 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a AIRBASE based on the AirbaseName.</p>
|
||||
<p>Finds an AIRBASE based on the AirbaseName.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -835,6 +945,32 @@ The found AIRBASE.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FindCargo" >
|
||||
<strong>DATABASE:FindCargo(CargoName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds an CARGO based on the CargoName.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string CargoName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Wrapper.Cargo.html##(CARGO)">Wrapper.Cargo#CARGO</a>:</em>
|
||||
The found CARGO.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).FindClient" >
|
||||
<strong>DATABASE:FindClient(ClientName)</strong>
|
||||
</a>
|
||||
@ -981,6 +1117,38 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).ForEachCargo" >
|
||||
<strong>DATABASE:ForEachCargo(IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).ForEachClient" >
|
||||
<strong>DATABASE:ForEachClient(IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
@ -994,7 +1162,7 @@ self</p>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive player in the database. The function needs to accept a CLIENT parameter.</p>
|
||||
The function that will be called object in the database. The function needs to accept a CLIENT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1026,7 +1194,7 @@ self</p>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive GROUP in the database. The function needs to accept a GROUP parameter.</p>
|
||||
The function that will be called for each object in the database. The function needs to accept a GROUP parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1058,7 +1226,7 @@ self</p>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an player in the database. The function needs to accept the player name.</p>
|
||||
The function that will be called for each object in the database. The function needs to accept the player name.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1090,7 +1258,7 @@ self</p>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is was a player in the database. The function needs to accept a UNIT parameter.</p>
|
||||
The function that will be called for each object in the database. The function needs to accept a UNIT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1122,7 +1290,7 @@ self</p>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive UNIT in the database. The function needs to accept a UNIT parameter.</p>
|
||||
The function that will be called for each object in the database. The function needs to accept a UNIT parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
@ -1415,6 +1583,48 @@ self</p>
|
||||
<pre class="example"><code>-- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
|
||||
DBObject = DATABASE:New()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).OnEventDeleteCargo" >
|
||||
<strong>DATABASE:OnEventDeleteCargo(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnEventDeleteCargo.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).OnEventNewCargo" >
|
||||
<strong>DATABASE:OnEventNewCargo(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnEventNewCargo event.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -210,6 +211,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -218,6 +220,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -162,6 +163,28 @@
|
||||
<td class="summary">
|
||||
<h1>1) SET_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
<p>The <a href="Set.html##(SET_BASE)">Set#SET_BASE</a> class defines the core functions that define a collection of objects.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SET_CARGO">SET_CARGO</a></td>
|
||||
<td class="summary">
|
||||
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
|
||||
|
||||
<ul>
|
||||
<li>Coalitions</li>
|
||||
<li>Types</li>
|
||||
<li>Name or Prefix</li>
|
||||
</ul>
|
||||
|
||||
<h2>SET_CARGO constructor</h2>
|
||||
|
||||
<p>Create a new SET_CARGO object with the <a href="##(SET_CARGO).New">SET_CARGO.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_CARGO).New">SET_CARGO.New</a>: Creates a new SET_CARGO object.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -474,6 +497,106 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_BASE)._Find">SET_BASE:_Find(ObjectName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds an <a href="Base.html##(BASE)">Base#BASE</a> object based on the object Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(SET_CARGO)">Type <code>SET_CARGO</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddCargosByName">SET_CARGO:AddCargosByName(AddCargoNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Add CARGOs to SET_CARGO.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddInDatabase">SET_CARGO:AddInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCoalitions">SET_CARGO:FilterCoalitions(Coalitions)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of coalitions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCountries">SET_CARGO:FilterCountries(Countries)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined countries.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterPrefixes">SET_CARGO:FilterPrefixes(Prefixes)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined cargo prefixes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterStart">SET_CARGO:FilterStart()</a></td>
|
||||
<td class="summary">
|
||||
<p>Starts the filtering.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterTypes">SET_CARGO:FilterTypes(Types)</a></td>
|
||||
<td class="summary">
|
||||
<p>Builds a set of cargos of defined cargo types.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindCargo">SET_CARGO:FindCargo(CargoName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Finds a Cargo based on the Cargo Name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindInDatabase">SET_CARGO:FindInDatabase(Event)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindNearestCargoFromPointVec2">SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).ForEachCargo">SET_CARGO:ForEachCargo(IteratorFunction, ...)</a></td>
|
||||
<td class="summary">
|
||||
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).IsIncludeObject">SET_CARGO:IsIncludeObject(MCargo)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).New">SET_CARGO:New()</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventDeleteCargo">SET_CARGO:OnEventDeleteCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventNewCargo">SET_CARGO:OnEventNewCargo(EventData)</a></td>
|
||||
<td class="summary">
|
||||
<p>Handles the OnEventNewCargo event for the Set.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).RemoveCargosByName">SET_CARGO:RemoveCargosByName(RemoveCargoNames)</a></td>
|
||||
<td class="summary">
|
||||
<p>Remove CARGOs from SET_CARGO.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -942,6 +1065,72 @@ The default <strong>"time interval"</strong> is after 0.001 seconds.</p>
|
||||
You can set the <strong>"yield interval"</strong>, and the <strong>"time interval"</strong>. (See above).</p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SET_CARGO)">#SET_CARGO</a></em>
|
||||
<a id="SET_CARGO" >
|
||||
<strong>SET_CARGO</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
|
||||
|
||||
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
|
||||
|
||||
<ul>
|
||||
<li>Coalitions</li>
|
||||
<li>Types</li>
|
||||
<li>Name or Prefix</li>
|
||||
</ul>
|
||||
|
||||
<h2>SET_CARGO constructor</h2>
|
||||
|
||||
<p>Create a new SET_CARGO object with the <a href="##(SET_CARGO).New">SET_CARGO.New</a> method:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_CARGO).New">SET_CARGO.New</a>: Creates a new SET_CARGO object.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p> </p>
|
||||
<h2>Add or Remove CARGOs from SET_CARGO</h2>
|
||||
|
||||
<p>CARGOs can be added and removed using the <a href="Set.html##(SET_CARGO).AddCargosByName">Set#SET_CARGO.AddCargosByName</a> and <a href="Set.html##(SET_CARGO).RemoveCargosByName">Set#SET_CARGO.RemoveCargosByName</a> respectively.
|
||||
These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.</p>
|
||||
|
||||
<h2>SET_CARGO filter criteria</h2>
|
||||
|
||||
<p>You can set filter criteria to automatically maintain the SET_CARGO contents.
|
||||
Filter criteria are defined by:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_CARGO).FilterCoalitions">SET_CARGO.FilterCoalitions</a>: Builds the SET_CARGO with the cargos belonging to the coalition(s).</li>
|
||||
<li><a href="##(SET_CARGO).FilterPrefixes">SET_CARGO.FilterPrefixes</a>: Builds the SET_CARGO with the cargos containing the prefix string(s).</li>
|
||||
<li><a href="##(SET_CARGO).FilterTypes">SET_CARGO.FilterTypes</a>: Builds the SET_CARGO with the cargos belonging to the cargo type(s).</li>
|
||||
<li><a href="##(SET_CARGO).FilterCountries">SET_CARGO.FilterCountries</a>: Builds the SET_CARGO with the cargos belonging to the country(ies).</li>
|
||||
</ul>
|
||||
|
||||
<p>Once the filter criteria have been set for the SET_CARGO, you can start filtering using:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_CARGO).FilterStart">SET_CARGO.FilterStart</a>: Starts the filtering of the cargos within the SET_CARGO.</li>
|
||||
</ul>
|
||||
|
||||
<h2>SET_CARGO iterators</h2>
|
||||
|
||||
<p>Once the filters have been defined and the SET<em>CARGO has been built, you can iterate the SET</em>CARGO with the available iterator methods.
|
||||
The iterator methods will walk the SET<em>CARGO set, and call for each cargo within the set a function that you provide.
|
||||
The following iterator methods are currently available within the SET</em>CARGO:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SET_CARGO).ForEachCargo">SET_CARGO.ForEachCargo</a>: Calls a function for each cargo it finds within the SET_CARGO.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2208,6 +2397,454 @@ self</p>
|
||||
<p><em><a href="Core.Base.html##(BASE)">Core.Base#BASE</a>:</em>
|
||||
The Object found.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(SET_CARGO)" >Type <code>SET_CARGO</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).AddCargosByName" >
|
||||
<strong>SET_CARGO:AddCargosByName(AddCargoNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Add CARGOs to SET_CARGO.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string AddCargoNames </em></code>:
|
||||
A single name or an array of CARGO names.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).AddInDatabase" >
|
||||
<strong>SET_CARGO:AddInDatabase(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE birth event gets called later than the SET</em>BASE birth event!</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the CARGO</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#table:</em>
|
||||
The CARGO</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FilterCoalitions" >
|
||||
<strong>SET_CARGO:FilterCoalitions(Coalitions)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of coalitions.</p>
|
||||
|
||||
|
||||
<p>Possible current coalitions are red, blue and neutral.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Coalitions </em></code>:
|
||||
Can take the following values: "red", "blue", "neutral".</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FilterCountries" >
|
||||
<strong>SET_CARGO:FilterCountries(Countries)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined countries.</p>
|
||||
|
||||
|
||||
<p>Possible current countries are those known within DCS world.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Countries </em></code>:
|
||||
Can take those country strings known within DCS world.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FilterPrefixes" >
|
||||
<strong>SET_CARGO:FilterPrefixes(Prefixes)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined cargo prefixes.</p>
|
||||
|
||||
|
||||
<p>All the cargos starting with the given prefixes will be included within the set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Prefixes </em></code>:
|
||||
The prefix of which the cargo name starts with.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FilterStart" >
|
||||
<strong>SET_CARGO:FilterStart()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Starts the filtering.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FilterTypes" >
|
||||
<strong>SET_CARGO:FilterTypes(Types)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Builds a set of cargos of defined cargo types.</p>
|
||||
|
||||
|
||||
<p>Possible current types are those types known within DCS world.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Types </em></code>:
|
||||
Can take those type strings known within DCS world.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FindCargo" >
|
||||
<strong>SET_CARGO:FindCargo(CargoName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Finds a Cargo based on the Cargo Name.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string CargoName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Wrapper.Cargo.html##(CARGO)">Wrapper.Cargo#CARGO</a>:</em>
|
||||
The found Cargo.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FindInDatabase" >
|
||||
<strong>SET_CARGO:FindInDatabase(Event)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the Database to check on any event that Object exists in the Database.</p>
|
||||
|
||||
|
||||
<p>This is required, because sometimes the <em>DATABASE event gets called later than the SET</em>BASE event or vise versa!</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> Event </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return values</h3>
|
||||
<ol>
|
||||
<li>
|
||||
|
||||
<p><em>#string:</em>
|
||||
The name of the CARGO</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><em>#table:</em>
|
||||
The CARGO</p>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).FindNearestCargoFromPointVec2" >
|
||||
<strong>SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Point.html##(POINT_VEC2)">Core.Point#POINT_VEC2</a> PointVec2 </em></code>:
|
||||
A <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a> object from where to evaluate the closest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a>.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Wrapper.Cargo.html##(CARGO)">Wrapper.Cargo#CARGO</a>:</em>
|
||||
The closest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a>.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).ForEachCargo" >
|
||||
<strong>SET_CARGO:ForEachCargo(IteratorFunction, ...)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#function IteratorFunction </em></code>:
|
||||
The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> ... </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).IsIncludeObject" >
|
||||
<strong>SET_CARGO:IsIncludeObject(MCargo)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="AI.AI_Cargo.html##(AI_CARGO)">AI.AI<em>Cargo#AI</em>CARGO</a> MCargo </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).New" >
|
||||
<strong>SET_CARGO:New()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SET_CARGO)">#SET_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
<h3>Usage:</h3>
|
||||
<pre class="example"><code>-- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
|
||||
DatabaseSet = SET_CARGO:New()</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).OnEventDeleteCargo" >
|
||||
<strong>SET_CARGO:OnEventDeleteCargo(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnDead or OnCrash event for alive units set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).OnEventNewCargo" >
|
||||
<strong>SET_CARGO:OnEventNewCargo(EventData)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Handles the OnEventNewCargo event for the Set.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SET_CARGO).RemoveCargosByName" >
|
||||
<strong>SET_CARGO:RemoveCargosByName(RemoveCargoNames)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Remove CARGOs from SET_CARGO.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Cargo.html##(CARGO)">Wrapper.Cargo#CARGO</a> RemoveCargoNames </em></code>:
|
||||
A single name or an array of CARGO names.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
|
||||
<p>self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -809,6 +810,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2110,9 +2117,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2583,9 +2587,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2621,7 +2622,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@ -2638,7 +2639,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@ -2966,7 +2967,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#boolean</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnUnControlled" >
|
||||
<strong>SPAWN.SpawnUnControlled</strong>
|
||||
</a>
|
||||
@ -2990,7 +2991,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
|
||||
|
||||
|
||||
<p> Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.</p>
|
||||
<p> When the first Spawn executes, all the Groups need to be made visible before start.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -3556,6 +3557,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li>Task</li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li>Task_A2G</li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li>Task_A2G_Dispatcher</li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
826
docs/Documentation/Task_CARGO.html
Normal file
826
docs/Documentation/Task_CARGO.html
Normal file
@ -0,0 +1,826 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
||||
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
||||
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
||||
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
||||
<li><a href="Account.html">Account</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
||||
<li><a href="Assign.html">Assign</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="Cargo.html">Cargo</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
||||
<li><a href="Controllable.html">Controllable</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Detection.html">Detection</a></li>
|
||||
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="Fsm.html">Fsm</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="Identifiable.html">Identifiable</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="Mission.html">Mission</a></li>
|
||||
<li><a href="Movement.html">Movement</a></li>
|
||||
<li><a href="Object.html">Object</a></li>
|
||||
<li><a href="Point.html">Point</a></li>
|
||||
<li><a href="Positionable.html">Positionable</a></li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li><a href="Radio.html">Radio</a></li>
|
||||
<li><a href="Route.html">Route</a></li>
|
||||
<li><a href="Scenery.html">Scenery</a></li>
|
||||
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li>Task_CARGO</li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>Task_CARGO</code></h1>
|
||||
|
||||
<p><strong>Tasking (Release 2.1)</strong> -- The TASK_CARGO models tasks for players to transport <a href="Cargo.html">Cargo</a>.</p>
|
||||
|
||||
|
||||
|
||||
<p><img src="..\Presentations\TASK_CARGO\Dia1.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>Cargo are units or cargo objects within DCS world that allow to be transported or sling loaded by other units.
|
||||
The CARGO class, as part of the moose core, is able to Board, Load, UnBoard and UnLoad from Carrier units.
|
||||
This collection of classes in this module define tasks for human players to handle cargo objects.
|
||||
Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.</p>
|
||||
|
||||
<p>The following classes are important to consider:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(TASK_CARGO_TRANSPORT)">#TASK<em>CARGO</em>TRANSPORT</a>: Defines a task for a human player to transport a set of cargo between various zones.</li>
|
||||
</ul>
|
||||
|
||||
<p>==</p>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
||||
<li><em>Removed</em> parts are expressed in italic type face.</li>
|
||||
</ul>
|
||||
|
||||
<p>Hereby the change log:</p>
|
||||
|
||||
<p>2017-03-09: Revised version.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<h3>Authors:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>FlightControl</strong>: Concept, Design & Programming.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#TASK_CARGO">TASK_CARGO</a></td>
|
||||
<td class="summary">
|
||||
<h1>TASK_CARGO class, extends <a href="Task.html##(TASK)">Task#TASK</a></h1>
|
||||
|
||||
<p>The TASK_CARGO class defines <a href="Cargo.html">Cargo</a> transport tasks,
|
||||
based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TASK</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#TASK_CARGO_TRANSPORT">TASK_CARGO_TRANSPORT</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(FSM_PROCESS)">Type <code>FSM_PROCESS</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(FSM_PROCESS).Cargo">FSM_PROCESS.Cargo</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(FSM_PROCESS).DeployZone">FSM_PROCESS.DeployZone</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(TASK_CARGO)">Type <code>TASK_CARGO</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).AddDeployZone">TASK_CARGO:AddDeployZone(DeployZone, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).DeployZones">TASK_CARGO.DeployZones</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).GetPlannedMenuText">TASK_CARGO:GetPlannedMenuText()</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).GetTargetZone">TASK_CARGO:GetTargetZone(TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).New">TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType)</a></td>
|
||||
<td class="summary">
|
||||
<p>Instantiates a new TASK_CARGO.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).RemoveDeployZone">TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetCargo">TASK_CARGO.SetCargo</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetCargoPickup">TASK_CARGO:SetCargoPickup(Cargo, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetDeployZone">TASK_CARGO:SetDeployZone(DeployZone, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetDeployZones">TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetPenaltyOnFailed">TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set a penalty when the A2G attack has failed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetScoreOnDestroy">TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set a score when a target in scope of the A2G attack, has been destroyed .</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetScoreOnSuccess">TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit)</a></td>
|
||||
<td class="summary">
|
||||
<p>Set a score when all the targets in scope of the A2G attack, have been destroyed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).TaskType">TASK_CARGO.TaskType</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a id="#(TASK_CARGO_TRANSPORT)">Type <code>TASK_CARGO_TRANSPORT</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO_TRANSPORT).ClassName">TASK_CARGO_TRANSPORT.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO_TRANSPORT).New">TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo)</a></td>
|
||||
<td class="summary">
|
||||
<p>Instantiates a new TASK<em>CARGO</em>TRANSPORT.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(TASK_CARGO)">#TASK_CARGO</a></em>
|
||||
<a id="TASK_CARGO" >
|
||||
<strong>TASK_CARGO</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>TASK_CARGO class, extends <a href="Task.html##(TASK)">Task#TASK</a></h1>
|
||||
|
||||
<p>The TASK_CARGO class defines <a href="Cargo.html">Cargo</a> transport tasks,
|
||||
based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TASK</a>.</p>
|
||||
|
||||
|
||||
<p>The TASK_CARGO is implemented using a <a href="Statemachine.html##(FSM_TASK)">Statemachine#FSM_TASK</a>, and has the following statuses:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>None</strong>: Start of the process.</li>
|
||||
<li><strong>Planned</strong>: The cargo task is planned.</li>
|
||||
<li><strong>Assigned</strong>: The cargo task is assigned to a <a href="Group.html##(GROUP)">Group#GROUP</a>.</li>
|
||||
<li><strong>Success</strong>: The cargo task is successfully completed.</li>
|
||||
<li><strong>Failed</strong>: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.</li>
|
||||
</ul>
|
||||
|
||||
<h1>1.1) Set the scoring of achievements in a cargo task.</h1>
|
||||
|
||||
<p>Scoring or penalties can be given in the following circumstances:</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(TASK_CARGO_TRANSPORT)">#TASK_CARGO_TRANSPORT</a></em>
|
||||
<a id="TASK_CARGO_TRANSPORT" >
|
||||
<strong>TASK_CARGO_TRANSPORT</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(Task_CARGO)" >Type <code>Task_CARGO</code></a></h2>
|
||||
|
||||
<h2><a id="#(FSM_PROCESS)" >Type <code>FSM_PROCESS</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).Cargo" >
|
||||
<strong>FSM_PROCESS.Cargo</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM_PROCESS).DeployZone" >
|
||||
<strong>FSM_PROCESS.DeployZone</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(TASK_CARGO)" >Type <code>TASK_CARGO</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).AddDeployZone" >
|
||||
<strong>TASK_CARGO:AddDeployZone(DeployZone, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> DeployZone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(TASK_CARGO).DeployZones" >
|
||||
<strong>TASK_CARGO.DeployZones</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> setmetatable( {}, { __mode = "v" } ) -- weak table on value</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).GetPlannedMenuText" >
|
||||
<strong>TASK_CARGO:GetPlannedMenuText()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).GetTargetZone" >
|
||||
<strong>TASK_CARGO:GetTargetZone(TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a>:</em>
|
||||
The Zone object where the Target is located on the map.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).New" >
|
||||
<strong>TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Instantiates a new TASK_CARGO.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Tasking.Mission.html##(MISSION)">Tasking.Mission#MISSION</a> Mission </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Set.html##(SET_GROUP)">Set#SET_GROUP</a> SetGroup </em></code>:
|
||||
The set of groups for which the Task can be assigned.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TaskName </em></code>:
|
||||
The name of the Task.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Set.html##(SET_CARGO)">Core.Set#SET_CARGO</a> SetCargo </em></code>:
|
||||
The scope of the cargo to be transported.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TaskType </em></code>:
|
||||
The type of Cargo task.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).RemoveDeployZone" >
|
||||
<strong>TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> DeployZone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(TASK_CARGO).SetCargo" >
|
||||
<strong>TASK_CARGO.SetCargo</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetCargoPickup" >
|
||||
<strong>TASK_CARGO:SetCargoPickup(Cargo, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="AI.AI_Cargo.html##(AI_CARGO)">AI.AI<em>Cargo#AI</em>CARGO</a> Cargo </em></code>:
|
||||
The cargo.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetDeployZone" >
|
||||
<strong>TASK_CARGO:SetDeployZone(DeployZone, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE)">Core.Zone#ZONE</a> DeployZone </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetDeployZones" >
|
||||
<strong>TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> @ </em></code>:
|
||||
ist<Core.Zone#ZONE> DeployZones</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> DeployZones </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetPenaltyOnFailed" >
|
||||
<strong>TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set a penalty when the A2G attack has failed.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Text </em></code>:
|
||||
The text to display to the player, when the A2G attack has failed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Penalty </em></code>:
|
||||
The penalty in points.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetScoreOnDestroy" >
|
||||
<strong>TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set a score when a target in scope of the A2G attack, has been destroyed .</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Text </em></code>:
|
||||
The text to display to the player, when the target has been destroyed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Score </em></code>:
|
||||
The score in points.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO).SetScoreOnSuccess" >
|
||||
<strong>TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Set a score when all the targets in scope of the A2G attack, have been destroyed.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Text </em></code>:
|
||||
The text to display to the player, when all targets hav been destroyed.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Score </em></code>:
|
||||
The score in points.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Unit.html##(UNIT)">Wrapper.Unit#UNIT</a> TaskUnit </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(TASK_CARGO).TaskType" >
|
||||
<strong>TASK_CARGO.TaskType</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(TASK_CARGO_TRANSPORT)" >Type <code>TASK_CARGO_TRANSPORT</code></a></h2>
|
||||
|
||||
<p>The TASK<em>CARGO</em>TRANSPORT class</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(TASK_CARGO_TRANSPORT).ClassName" >
|
||||
<strong>TASK_CARGO_TRANSPORT.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(TASK_CARGO_TRANSPORT).New" >
|
||||
<strong>TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Instantiates a new TASK<em>CARGO</em>TRANSPORT.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Tasking.Mission.html##(MISSION)">Tasking.Mission#MISSION</a> Mission </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Set.html##(SET_GROUP)">Set#SET_GROUP</a> SetGroup </em></code>:
|
||||
The set of groups for which the Task can be assigned.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string TaskName </em></code>:
|
||||
The name of the Task.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Set.html##(SET_CARGO)">Core.Set#SET_CARGO</a> SetCargo </em></code>:
|
||||
The scope of the cargo to be transported.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(TASK_CARGO_TRANSPORT)">#TASK<em>CARGO</em>TRANSPORT</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li>Task_PICKUP</li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li>Unit</li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li>Utils</li>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -173,7 +174,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE">ZONE</a></td>
|
||||
<td class="summary">
|
||||
<h1>3) ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
|
||||
</td>
|
||||
@ -181,7 +182,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_BASE">ZONE_BASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>1) ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
<h1>ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
</td>
|
||||
@ -189,7 +190,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_GROUP">ZONE_GROUP</a></td>
|
||||
<td class="summary">
|
||||
<h1>5) #ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</p>
|
||||
</td>
|
||||
@ -197,7 +198,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_POLYGON">ZONE_POLYGON</a></td>
|
||||
<td class="summary">
|
||||
<h1>7) ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
<h1>ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
</td>
|
||||
@ -205,7 +206,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_POLYGON_BASE">ZONE_POLYGON_BASE</a></td>
|
||||
<td class="summary">
|
||||
<h1>6) ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
<h1>ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
</td>
|
||||
@ -213,7 +214,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_RADIUS">ZONE_RADIUS</a></td>
|
||||
<td class="summary">
|
||||
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
<h1>ZONE_RADIUS class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
|
||||
</td>
|
||||
@ -221,7 +222,7 @@
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#ZONE_UNIT">ZONE_UNIT</a></td>
|
||||
<td class="summary">
|
||||
<h1>4) #ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
|
||||
</td>
|
||||
@ -309,18 +310,30 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).GetZoneProbability">ZONE_BASE:GetZoneProbability()</a></td>
|
||||
<td class="summary">
|
||||
<p>Get the randomization probability of a zone to be selected.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsPointVec2InZone">ZONE_BASE:IsPointVec2InZone(PointVec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a PointVec2 is within the zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsPointVec3InZone">ZONE_BASE:IsPointVec3InZone(PointVec3)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a PointVec3 is within the zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsVec2InZone">ZONE_BASE:IsVec2InZone(Vec2)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a location is within the zone.</p>
|
||||
<p>Returns if a Vec2 is within the zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_BASE).IsVec3InZone">ZONE_BASE:IsVec3InZone(Vec3)</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns if a point is within the zone.</p>
|
||||
<p>Returns if a Vec3 is within the zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -457,6 +470,12 @@
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON_BASE).GetRandomVec2">ZONE_POLYGON_BASE:GetRandomVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(ZONE_POLYGON_BASE).GetVec2">ZONE_POLYGON_BASE:GetVec2()</a></td>
|
||||
<td class="summary">
|
||||
<p>Returns the center location of the polygon.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -636,15 +655,13 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>3) ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE class, defined by the zone name as defined within the Mission Editor.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -658,26 +675,26 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>1) ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
<h1>ZONE_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>This class is an abstract BASE class for derived classes, and is not meant to be instantiated.</p>
|
||||
|
||||
|
||||
|
||||
<h2>1.1) Each zone has a name:</h2>
|
||||
<h2>Each zone has a name:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetName">ZONE_BASE.GetName</a>(): Returns the name of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.2) Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</h2>
|
||||
<h2>Each zone implements two polymorphic functions defined in <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).IsVec2InZone">ZONE_BASE.IsVec2InZone</a>(): Returns if a Vec2 is within the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).IsVec3InZone">ZONE_BASE.IsVec3InZone</a>(): Returns if a Vec3 is within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) A zone has a probability factor that can be set to randomize a selection between zones:</h2>
|
||||
<h2>A zone has a probability factor that can be set to randomize a selection between zones:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SetRandomizeProbability">ZONE_BASE.SetRandomizeProbability</a>(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )</li>
|
||||
@ -685,27 +702,26 @@
|
||||
<li><a href="##(ZONE_BASE).GetZoneMaybe">ZONE_BASE.GetZoneMaybe</a>(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) A zone manages Vectors:</h2>
|
||||
<h2>A zone manages Vectors:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetVec2">ZONE_BASE.GetVec2</a>(): Returns the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> coordinate of the zone.</li>
|
||||
<li><a href="##(ZONE_BASE).GetRandomVec2">ZONE_BASE.GetRandomVec2</a>(): Define a random <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.5) A zone has a bounding square:</h2>
|
||||
<h2>A zone has a bounding square:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).GetBoundingSquare">ZONE_BASE.GetBoundingSquare</a>(): Get the outer most bounding square of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.6) A zone can be marked:</h2>
|
||||
<h2>A zone can be marked:</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_BASE).SmokeZone">ZONE_BASE.SmokeZone</a>(): Smokes the zone boundaries in a color.</li>
|
||||
<li><a href="##(ZONE_BASE).FlareZone">ZONE_BASE.FlareZone</a>(): Flares the zone boundaries in a color.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -719,7 +735,7 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>5) #ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE_GROUP class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_GROUP class defines by a zone around a <a href="Group.html##(GROUP)">Group#GROUP</a> with a radius.</p>
|
||||
|
||||
@ -727,8 +743,6 @@
|
||||
<p>The current leader of the group defines the center of the zone.
|
||||
This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -742,15 +756,13 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>7) ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
<h1>ZONE_POLYGON class, extends <a href="Zone.html##(ZONE_POLYGON_BASE)">Zone#ZONE<em>POLYGON</em>BASE</a></h1>
|
||||
|
||||
<p>The ZONE_POLYGON class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -764,7 +776,7 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>6) ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
<h1>ZONE<em>POLYGON</em>BASE class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE<em>POLYGON</em>BASE class defined by a sequence of <a href="Group.html##(GROUP)">Group#GROUP</a> waypoints within the Mission Editor, forming a polygon.</p>
|
||||
|
||||
@ -772,7 +784,7 @@ This class implements the inherited functions from <a href="Zone.html##(ZONE_RAD
|
||||
<p>This class implements the inherited functions from <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> 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.</p>
|
||||
|
||||
<h2>6.1) Zone point randomization</h2>
|
||||
<h2>Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
@ -782,8 +794,6 @@ This class is an abstract BASE class for derived classes, and is not meant to be
|
||||
<li><a href="##(ZONE_POLYGON_BASE).GetRandomPointVec3">ZONE<em>POLYGON</em>BASE.GetRandomPointVec3</a>(): Return a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point at landheight within the zone.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -797,27 +807,27 @@ This class is an abstract BASE class for derived classes, and is not meant to be
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>2) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
<h1>ZONE_RADIUS class, extends <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a></h1>
|
||||
|
||||
<p>The ZONE_RADIUS class defined by a zone name, a location and a radius.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.</p>
|
||||
|
||||
<h2>2.1) <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a> constructor</h2>
|
||||
<h2>ZONE_RADIUS constructor</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).New">ZONE_RADIUS.New</a>(): Constructor.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.2) Manage the radius of the zone</h2>
|
||||
<h2>Manage the radius of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetRadius">ZONE_RADIUS.SetRadius</a>(): Sets the radius of the zone.</li>
|
||||
<li><a href="##(ZONE_RADIUS).GetRadius">ZONE_RADIUS.GetRadius</a>(): Returns the radius of the zone.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.3) Manage the location of the zone</h2>
|
||||
<h2>Manage the location of the zone</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(ZONE_RADIUS).SetVec2">ZONE_RADIUS.SetVec2</a>(): Sets the <a href="DCSTypes.html##(Vec2)">DCSTypes#Vec2</a> of the zone.</li>
|
||||
@ -825,7 +835,7 @@ This class is an abstract BASE class for derived classes, and is not meant to be
|
||||
<li><a href="##(ZONE_RADIUS).GetVec3">ZONE_RADIUS.GetVec3</a>(): Returns the <a href="DCSTypes.html##(Vec3)">DCSTypes#Vec3</a> of the zone, taking an additional height parameter.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2.4) Zone point randomization</h2>
|
||||
<h2>Zone point randomization</h2>
|
||||
|
||||
<p>Various functions exist to find random points within the zone.</p>
|
||||
|
||||
@ -835,8 +845,6 @@ This class is an abstract BASE class for derived classes, and is not meant to be
|
||||
<li><a href="##(ZONE_RADIUS).GetRandomPointVec3">ZONE_RADIUS.GetRandomPointVec3</a>(): Gets a <a href="Point.html##(POINT_VEC3)">Point#POINT_VEC3</a> object representing a random 3D point in the zone. Note that the height of the point is at landheight.</li>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -850,15 +858,13 @@ This class is an abstract BASE class for derived classes, and is not meant to be
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>4) #ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
<h1>ZONE_UNIT class, extends <a href="Zone.html##(ZONE_RADIUS)">Zone#ZONE_RADIUS</a></h1>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
|
||||
|
||||
|
||||
<p>This class implements the inherited functions from <a href="##(ZONE_RADIUS)">#ZONE_RADIUS</a> taking into account the own zone format and properties.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1150,27 +1156,81 @@ A value between 0 and 1. 0 = 0% and 1 = 100% probability.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_BASE).IsVec2InZone" >
|
||||
<strong>ZONE_BASE:IsVec2InZone(Vec2)</strong>
|
||||
<a id="#(ZONE_BASE).IsPointVec2InZone" >
|
||||
<strong>ZONE_BASE:IsPointVec2InZone(PointVec2)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a location is within the zone.</p>
|
||||
<p>Returns if a PointVec2 is within the zone.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a> Vec2 </em></code>:
|
||||
The location to test.</p>
|
||||
<p><code><em><a href="Core.Point.html##(POINT_VEC2)">Core.Point#POINT_VEC2</a> PointVec2 </em></code>:
|
||||
The PointVec2 to test.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if the location is within the zone.</p>
|
||||
true if the PointVec2 is within the zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_BASE).IsPointVec3InZone" >
|
||||
<strong>ZONE_BASE:IsPointVec3InZone(PointVec3)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a PointVec3 is within the zone.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Point.html##(POINT_VEC3)">Core.Point#POINT_VEC3</a> PointVec3 </em></code>:
|
||||
The PointVec3 to test.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if the PointVec3 is within the zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_BASE).IsVec2InZone" >
|
||||
<strong>ZONE_BASE:IsVec2InZone(Vec2)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a Vec2 is within the zone.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a> Vec2 </em></code>:
|
||||
The Vec2 to test.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if the Vec2 is within the zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1183,7 +1243,7 @@ true if the location is within the zone.</p>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns if a point is within the zone.</p>
|
||||
<p>Returns if a Vec3 is within the zone.</p>
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
@ -1197,7 +1257,7 @@ The point to test.</p>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em>#boolean:</em>
|
||||
true if the point is within the zone.</p>
|
||||
true if the Vec3 is within the zone.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1616,6 +1676,24 @@ The Vec2 coordinate.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_POLYGON_BASE).GetVec2" >
|
||||
<strong>ZONE_POLYGON_BASE:GetVec2()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Returns the center location of the polygon.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="Dcs.DCSTypes.html##(Vec2)">Dcs.DCSTypes#Vec2</a>:</em>
|
||||
The location of the zone based on the <a href="Group.html">Group</a> location.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(ZONE_POLYGON_BASE).IsVec2InZone" >
|
||||
<strong>ZONE_POLYGON_BASE:IsVec2InZone(Vec2)</strong>
|
||||
</a>
|
||||
@ -2182,10 +2260,7 @@ self</p>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(ZONE_UNIT)" >Type <code>ZONE_UNIT</code></a></h2>
|
||||
|
||||
<p>The ZONE_UNIT class defined by a zone around a <a href="Unit.html##(UNIT)">Unit#UNIT</a> with a radius.</p>
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
@ -517,6 +518,12 @@ and creates a CSV file logging the scoring events and results for use at team or
|
||||
<td class="name" nowrap="nowrap"><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Tasking</strong> - The TASK<em>A2G</em>DISPATCHER creates and manages player TASK_A2G tasks based on detected targets.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Task_CARGO.html">Task_CARGO</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Tasking (Release 2.1)</strong> -- The TASK_CARGO models tasks for players to transport <a href="Cargo.html">Cargo</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -80,6 +80,7 @@
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
|
||||
BIN
docs/Presentations/TASK_CARGO/Dia1.JPG
Normal file
BIN
docs/Presentations/TASK_CARGO/Dia1.JPG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 218 KiB |
Loading…
x
Reference in New Issue
Block a user