Merge pull request #428 from FlightControl-Master/master-353-task-cargo-transport
Master 353 task cargo transport
@ -228,7 +228,8 @@ BASE = {
|
||||
-- @type FORMATION
|
||||
-- @field Cone A cone formation.
|
||||
FORMATION = {
|
||||
Cone = "Cone"
|
||||
Cone = "Cone",
|
||||
Vee = "Vee"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -124,7 +124,7 @@ end
|
||||
-- @param Core.Base#BASE Object
|
||||
-- @return Core.Base#BASE The added BASE Object.
|
||||
function SET_BASE:Add( ObjectName, Object )
|
||||
self:F2( ObjectName )
|
||||
self:F( ObjectName )
|
||||
|
||||
local t = { _ = Object }
|
||||
|
||||
@ -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 ) )
|
||||
|
||||
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
|
||||
|
||||
self:HandleEvent( EVENTS.NewCargo )
|
||||
self:HandleEvent( EVENTS.DeleteCargo )
|
||||
|
||||
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 = {
|
||||
|
||||
@ -117,6 +117,21 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
|
||||
end
|
||||
)
|
||||
|
||||
-- Handle when a player leaves a slot and goes back to spectators ...
|
||||
-- The PlayerUnit will be UnAssigned from the Task.
|
||||
-- When there is no Unit left running the Task, the Task goes into Abort...
|
||||
self:HandleEvent( EVENTS.MissionEnd,
|
||||
--- @param #TASK self
|
||||
-- @param Core.Event#EVENTDATA EventData
|
||||
function( self, EventData )
|
||||
local PlayerUnit = EventData.IniUnit
|
||||
for MissionID, Mission in pairs( self:GetMissions() ) do
|
||||
local Mission = Mission -- Tasking.Mission#MISSION
|
||||
Mission:Stop()
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
-- Handle when a player leaves a slot and goes back to spectators ...
|
||||
-- The PlayerUnit will be UnAssigned from the Task.
|
||||
-- When there is no Unit left running the Task, the Task goes into Abort...
|
||||
@ -127,7 +142,9 @@ function COMMANDCENTER:New( CommandCenterPositionable, CommandCenterName )
|
||||
local PlayerUnit = EventData.IniUnit
|
||||
for MissionID, Mission in pairs( self:GetMissions() ) do
|
||||
local Mission = Mission -- Tasking.Mission#MISSION
|
||||
Mission:AbortUnit( PlayerUnit )
|
||||
if Mission:IsOngoing() then
|
||||
Mission:AbortUnit( PlayerUnit )
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
@ -257,8 +274,7 @@ end
|
||||
-- @param #sring Name (optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.
|
||||
function COMMANDCENTER:MessageToGroup( Message, TaskGroup, Name )
|
||||
|
||||
local Prefix = "@ Group"
|
||||
Prefix = Prefix .. ( Name and " (" .. Name .. "): " or '' )
|
||||
local Prefix = Name and "@ " .. Name .. ": " or "@ " .. TaskGroup:GetCallsign() .. ": "
|
||||
Message = Prefix .. Message
|
||||
self:GetPositionable():MessageToGroup( Message , 20, TaskGroup, self:GetName() )
|
||||
|
||||
|
||||
@ -275,8 +275,9 @@ function TASK:AbortUnit( PlayerUnit )
|
||||
local IsAssignedToGroup = self:IsAssignedToGroup( PlayerGroup )
|
||||
self:E( { IsAssignedToGroup = IsAssignedToGroup } )
|
||||
if IsAssignedToGroup then
|
||||
local PlayerName = PlayerUnit:GetPlayerName()
|
||||
self:UnAssignFromUnit( PlayerUnit )
|
||||
self:MessageToGroups( PlayerUnit:GetPlayerName() .. " aborted Task " .. self:GetName() )
|
||||
self:MessageToGroups( PlayerName .. " aborted Task " .. self:GetName() )
|
||||
self:E( { TaskGroup = PlayerGroup:GetName(), GetUnits = PlayerGroup:GetUnits() } )
|
||||
if #PlayerGroup:GetUnits() == 1 then
|
||||
self:UnAssignFromGroup( PlayerGroup )
|
||||
|
||||
669
Moose Development/Moose/Tasking/Task_CARGO.lua
Normal file
@ -0,0 +1,669 @@
|
||||
--- **Tasking (Release 2.1)** -- The TASK_CARGO models tasks for players to transport @{Cargo}.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers.
|
||||
-- The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.
|
||||
--
|
||||
-- This collection of classes in this module define tasks for human players to handle these 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}
|
||||
--
|
||||
-- ## A flexible tasking system
|
||||
--
|
||||
-- The TASK_CARGO classes provide you with a flexible tasking sytem,
|
||||
-- that allows you to transport cargo of various types between various locations
|
||||
-- and various dedicated deployment zones.
|
||||
--
|
||||
-- The cargo in scope of the TASK_CARGO classes must be explicitly given, and is of type SET_CARGO.
|
||||
-- The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.
|
||||
--
|
||||
--
|
||||
-- ## Task execution experience from the player perspective
|
||||
--
|
||||
-- A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J).
|
||||
-- The player needs to accept the task from the task overview list within the mission, using the radio menus.
|
||||
--
|
||||
-- Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain
|
||||
-- an extra **Cargo Handling Radio Menu** that contains the CARGO objects that need to be transported.
|
||||
--
|
||||
-- Each CARGO object has a certain state:
|
||||
--
|
||||
-- * **UnLoaded**: The CARGO is located within the battlefield. It may still need to be transported.
|
||||
-- * **Loaded**: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
|
||||
-- * **Boarding**: The CARGO is running or moving towards your Carrier for loading.
|
||||
-- * **UnBoarding**: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
|
||||
--
|
||||
-- Cargo must be transported towards different **Deployment @{Zone}s**.
|
||||
--
|
||||
-- The Cargo Handling Radio Menu system allows to execute **various actions** to handle the cargo.
|
||||
-- In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed.
|
||||
-- Depending on the location of your Carrier unit, the menu options will vary.
|
||||
--
|
||||
--
|
||||
-- ## Cargo Pickup and Boarding
|
||||
--
|
||||
-- For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen **Reporting Range**.
|
||||
-- Therefore, it is important that you steer your Carrier within the Reporting Range,
|
||||
-- so that boarding actions can be executed on the cargo.
|
||||
-- To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:
|
||||
--
|
||||
-- ### Board Cargo
|
||||
--
|
||||
-- If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option.
|
||||
-- Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo
|
||||
-- pickup. If the cargo moves to your carrier, it will indicate the boarding status.
|
||||
-- Note that multiple units need to board your Carrier, so it is required to await the full boarding process.
|
||||
-- Once the cargo is fully boarded within your Carrier, you will be notified of this.
|
||||
--
|
||||
-- Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated.
|
||||
-- If during boarding the Carrier gets airborne, the boarding process will be cancelled.
|
||||
--
|
||||
-- ## Pickup Cargo
|
||||
--
|
||||
-- If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location.
|
||||
-- Routing information is shown in flight that directs you to the cargo within Reporting Range.
|
||||
-- Upon arrival, the Cargo will contact you and further instructions will be given.
|
||||
-- When your Carrier is airborne, you will receive instructions to land your Carrier.
|
||||
-- The action will not be completed until you've landed your Carrier.
|
||||
--
|
||||
--
|
||||
-- ## Cargo Deploy and UnBoarding
|
||||
--
|
||||
-- Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying @{Zone} type.
|
||||
-- The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.
|
||||
--
|
||||
-- ### UnBoard Cargo
|
||||
--
|
||||
-- If your Carrier is already within a Deployment Zone,
|
||||
-- then the Cargo Handling Radio Menu allows to **UnBoard** a specific cargo that is
|
||||
-- loaded within your Carrier group into the Deployment Zone.
|
||||
-- Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier.
|
||||
-- Ensure that you stay at the position or stay on the ground while Unboarding.
|
||||
-- If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.
|
||||
--
|
||||
-- ### Deploy Cargo
|
||||
--
|
||||
-- If your Carrier is not within a Deployment Zone, you'll need to fly towards one.
|
||||
-- Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards.
|
||||
-- Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center.
|
||||
-- Upon arrival, the HQ will provide you with further instructions.
|
||||
-- When your Carrier is airborne, you will receive instructions to land your Carrier.
|
||||
-- The action will not be completed until you've landed your Carrier!
|
||||
--
|
||||
-- ## Handle TASK_CARGO Events ...
|
||||
--
|
||||
-- The TASK_CARGO classes define @{Cargo} transport tasks,
|
||||
-- based on the tasking capabilities defined in @{Task#TASK}.
|
||||
--
|
||||
-- ### Specific TASK_CARGO Events
|
||||
--
|
||||
-- Specific Cargo Handling event can be captured, that allow to trigger specific actions!
|
||||
--
|
||||
-- * **Boarded**: Triggered when the Cargo has been Boarded into your Carrier.
|
||||
-- * **UnBoarded**: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
|
||||
--
|
||||
-- ### Standard TASK_CARGO Events
|
||||
--
|
||||
-- The TASK_CARGO is implemented using a @{Statemachine#FSM_TASK}, and has the following standard 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.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @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", "Landing" }, "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:Flush()
|
||||
|
||||
Task.SetCargo:ForEachCargo(
|
||||
|
||||
--- @param Core.Cargo#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,
|
||||
DeployZone
|
||||
)
|
||||
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, DeployZone )
|
||||
self:__PrepareUnBoarding( 1.0, Cargo, DeployZone )
|
||||
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, "Pickup" )
|
||||
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, "Deploy" )
|
||||
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, Action )
|
||||
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() )
|
||||
self:__Land( -10, Action )
|
||||
else
|
||||
Task:GetMission():GetCommandCenter():MessageToGroup( "Landed ...", TaskUnit:GetGroup() )
|
||||
self:__Landed( -0.1, Action )
|
||||
end
|
||||
else
|
||||
if Action == "Pickup" then
|
||||
self:__RouteToPickupZone( -0.1 )
|
||||
else
|
||||
self:__RouteToDeployZone( -0.1 )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---
|
||||
-- @param #FSM_PROCESS self
|
||||
-- @param Wrapper.Unit#UNIT TaskUnit
|
||||
-- @param Tasking.Task_Cargo#TASK_CARGO Task
|
||||
function Fsm:onafterLanded( TaskUnit, Task, From, Event, To, Action )
|
||||
self:E( { TaskUnit = TaskUnit, Task = Task and Task:GetClassNameAndID() } )
|
||||
|
||||
if self.Cargo:IsInRadius( TaskUnit:GetPointVec2() ) then
|
||||
if TaskUnit:InAir() then
|
||||
self:__Land( -0.1, Action )
|
||||
else
|
||||
self:__SelectAction( -0.1 )
|
||||
end
|
||||
else
|
||||
if Action == "Pickup" then
|
||||
self:__RouteToPickupZone( -0.1 )
|
||||
else
|
||||
self:__RouteToDeployZone( -0.1 )
|
||||
end
|
||||
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 -- Core.Cargo#CARGO_GROUP
|
||||
self:__Board( -0.1 )
|
||||
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
|
||||
--- ABORT the boarding. Split group if any and go back to select action.
|
||||
else
|
||||
self.Cargo:MessageToGroup( "Boarding ...", TaskUnit:GetGroup() )
|
||||
self.Cargo:Board( TaskUnit, 20, 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() } )
|
||||
|
||||
self.Cargo:MessageToGroup( "Boarded ...", TaskUnit:GetGroup() )
|
||||
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.Cargo = Cargo
|
||||
self.DeployZone = DeployZone
|
||||
self:__UnBoard( -0.1 )
|
||||
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, DeployZone, TaskProcess )
|
||||
|
||||
self:E({From, Event, To, TaskUnit, TaskProcess })
|
||||
|
||||
TaskProcess:__UnBoarded( -0.1 )
|
||||
|
||||
end
|
||||
|
||||
self.Cargo:MessageToGroup( "UnBoarding ...", TaskUnit:GetGroup() )
|
||||
self.Cargo:UnBoard( self.DeployZone:GetPointVec2(), 20, self )
|
||||
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() } )
|
||||
|
||||
self.Cargo:MessageToGroup( "UnBoarded ...", TaskUnit:GetGroup() )
|
||||
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 *** ' )
|
||||
@ -14,6 +14,7 @@ Core/Message.lua
|
||||
Core/Fsm.lua
|
||||
Core/Radio.lua
|
||||
Core/SpawnStatic.lua
|
||||
Core/Cargo.lua
|
||||
|
||||
Wrapper/Object.lua
|
||||
Wrapper/Identifiable.lua
|
||||
@ -40,7 +41,6 @@ AI/AI_Balancer.lua
|
||||
AI/AI_Patrol.lua
|
||||
AI/AI_Cap.lua
|
||||
AI/AI_Cas.lua
|
||||
AI/AI_Cargo.lua
|
||||
|
||||
Actions/Act_Assign.lua
|
||||
Actions/Act_Route.lua
|
||||
@ -53,5 +53,6 @@ Tasking/Task.lua
|
||||
Tasking/DetectionManager.lua
|
||||
Tasking/Task_A2G_Dispatcher.lua
|
||||
Tasking/Task_A2G.lua
|
||||
Tasking/Task_Cargo.lua
|
||||
|
||||
Moose.lua
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170412_0926' )
|
||||
env.info( 'Moose Generation Timestamp: 20170413_0920' )
|
||||
|
||||
local base = _G
|
||||
|
||||
@ -36,6 +36,7 @@ __Moose.Include( 'Core/Message.lua' )
|
||||
__Moose.Include( 'Core/Fsm.lua' )
|
||||
__Moose.Include( 'Core/Radio.lua' )
|
||||
__Moose.Include( 'Core/SpawnStatic.lua' )
|
||||
__Moose.Include( 'Core/Cargo.lua' )
|
||||
__Moose.Include( 'Wrapper/Object.lua' )
|
||||
__Moose.Include( 'Wrapper/Identifiable.lua' )
|
||||
__Moose.Include( 'Wrapper/Positionable.lua' )
|
||||
@ -59,7 +60,6 @@ __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' )
|
||||
@ -70,6 +70,7 @@ __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( 'Tasking/Task_Cargo.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>
|
||||
@ -932,9 +933,6 @@ Use the method <a href="##(AI_PATROL_ZONE).ManageDamage">AI<em>PATROL</em>ZONE.M
|
||||
|
||||
|
||||
|
||||
|
||||
<p> This table contains the targets detected during patrol.</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>
|
||||
@ -522,6 +523,12 @@ When Moose is loaded statically, (as one file), tracing is switched off by defau
|
||||
<td class="name" nowrap="nowrap"><a href="##(FORMATION).Cone">FORMATION.Cone</a></td>
|
||||
<td class="summary">
|
||||
<p>A cone formation.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(FORMATION).Vee">FORMATION.Vee</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -2261,6 +2268,20 @@ A #table or any field.</p>
|
||||
|
||||
<p>A cone formation.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(FORMATION).Vee" >
|
||||
<strong>FORMATION.Vee</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><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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
@ -328,6 +329,18 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENT).ClassName">EVENT.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENT).CreateEventDeleteCargo">EVENT:CreateEventDeleteCargo(Cargo)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creation of a Cargo Deletion Event.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENT).CreateEventNewCargo">EVENT:CreateEventNewCargo(Cargo)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creation of a New Cargo Event.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -453,6 +466,18 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<h2><a id="#(EVENTDATA)">Type <code>EVENTDATA</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).Cargo">EVENTDATA.Cargo</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).CargoName">EVENTDATA.CargoName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTDATA).IniCategory">EVENTDATA.IniCategory</a></td>
|
||||
<td class="summary">
|
||||
<p>(UNIT) The category of the initiator.</p>
|
||||
@ -731,6 +756,12 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTS).Dead">EVENTS.Dead</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTS).DeleteCargo">EVENTS.DeleteCargo</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -779,6 +810,12 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTS).MissionStart">EVENTS.MissionStart</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(EVENTS).NewCargo">EVENTS.NewCargo</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -925,6 +962,50 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(EVENT).CreateEventDeleteCargo" >
|
||||
<strong>EVENT:CreateEventDeleteCargo(Cargo)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creation of a Cargo Deletion Event.</p>
|
||||
|
||||
<h3>Parameter</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 created.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(EVENT).CreateEventNewCargo" >
|
||||
<strong>EVENT:CreateEventNewCargo(Cargo)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creation of a New Cargo Event.</p>
|
||||
|
||||
<h3>Parameter</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 created.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1544,7 +1625,7 @@ Note that at the beginning of each field description, there is an indication whi
|
||||
|
||||
|
||||
<ul>
|
||||
<li>A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ
|
||||
<li>A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -1552,6 +1633,34 @@ Note that at the beginning of each field description, there is an indication whi
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(EVENTDATA).Cargo" >
|
||||
<strong>EVENTDATA.Cargo</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(EVENTDATA).CargoName" >
|
||||
<strong>EVENTDATA.CargoName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="Dcs.DCSUnit.html##(Unit.Category)">Dcs.DCSUnit#Unit.Category</a></em>
|
||||
<a id="#(EVENTDATA).IniCategory" >
|
||||
<strong>EVENTDATA.IniCategory</strong>
|
||||
@ -2194,6 +2303,20 @@ Note that at the beginning of each field description, there is an indication whi
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(EVENTS).DeleteCargo" >
|
||||
<strong>EVENTS.DeleteCargo</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2306,6 +2429,20 @@ Note that at the beginning of each field description, there is an indication whi
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(EVENTS).NewCargo" >
|
||||
<strong>EVENTS.NewCargo</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
@ -1581,7 +1582,7 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#string</em>
|
||||
<a id="#(FSM)._StartState" >
|
||||
<strong>FSM._StartState</strong>
|
||||
</a>
|
||||
@ -1880,7 +1881,6 @@ A string defining the start state.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(FSM).current" >
|
||||
<strong>FSM.current</strong>
|
||||
</a>
|
||||
|
||||
@ -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>
|
||||
@ -1366,7 +1367,6 @@ The new calculated POINT_VEC2.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
|
||||
@ -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>
|
||||
@ -2583,9 +2584,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2621,7 +2619,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 +2636,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
|
||||
@ -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>
|
||||
@ -441,7 +442,6 @@ ptional) The name of the new static.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
|
||||
@ -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>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>
|
||||
|
||||
943
docs/Documentation/Task_CARGO.html
Normal file
@ -0,0 +1,943 @@
|
||||
<!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="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSVec3.html">DCSVec3</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCSZone.html">DCSZone</a></li>
|
||||
<li><a href="DCScountry.html">DCScountry</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DCStrigger.html">DCStrigger</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="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</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="env.html">env</a></li>
|
||||
<li><a href="land.html">land</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>The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers.
|
||||
The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.</p>
|
||||
|
||||
<p>This collection of classes in this module define tasks for human players to handle these 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>
|
||||
|
||||
<h2>A flexible tasking system</h2>
|
||||
|
||||
<p>The TASK_CARGO classes provide you with a flexible tasking sytem,
|
||||
that allows you to transport cargo of various types between various locations
|
||||
and various dedicated deployment zones.</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>
|
||||
|
||||
<h2>A flexible tasking system</h2>
|
||||
|
||||
<p>The TASK_CARGO classes provide you with a flexible tasking sytem,
|
||||
that allows you to transport cargo of various types between various locations
|
||||
and various dedicated deployment zones.</p>
|
||||
|
||||
|
||||
|
||||
<p>The cargo in scope of the TASK<em>CARGO classes must be explicitly given, and is of type SET</em>CARGO.
|
||||
The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.</p>
|
||||
|
||||
|
||||
<h2>Task execution experience from the player perspective</h2>
|
||||
|
||||
<p>A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J).
|
||||
The player needs to accept the task from the task overview list within the mission, using the radio menus.</p>
|
||||
|
||||
<p>Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain
|
||||
an extra <strong>Cargo Handling Radio Menu</strong> that contains the CARGO objects that need to be transported.</p>
|
||||
|
||||
<p>Each CARGO object has a certain state:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>UnLoaded</strong>: The CARGO is located within the battlefield. It may still need to be transported.</li>
|
||||
<li><strong>Loaded</strong>: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.</li>
|
||||
<li><strong>Boarding</strong>: The CARGO is running or moving towards your Carrier for loading.</li>
|
||||
<li><strong>UnBoarding</strong>: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.</li>
|
||||
</ul>
|
||||
|
||||
<p>Cargo must be transported towards different **Deployment <a href="Zone.html">Zone</a>s**.</p>
|
||||
|
||||
<p>The Cargo Handling Radio Menu system allows to execute <strong>various actions</strong> to handle the cargo.
|
||||
In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed.
|
||||
Depending on the location of your Carrier unit, the menu options will vary.</p>
|
||||
|
||||
|
||||
<h2>Cargo Pickup and Boarding</h2>
|
||||
|
||||
<p>For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen <strong>Reporting Range</strong>.
|
||||
Therefore, it is important that you steer your Carrier within the Reporting Range,
|
||||
so that boarding actions can be executed on the cargo.
|
||||
To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:</p>
|
||||
|
||||
<h3>Board Cargo</h3>
|
||||
|
||||
<p>If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option.
|
||||
Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo
|
||||
pickup. If the cargo moves to your carrier, it will indicate the boarding status.
|
||||
Note that multiple units need to board your Carrier, so it is required to await the full boarding process.
|
||||
Once the cargo is fully boarded within your Carrier, you will be notified of this.</p>
|
||||
|
||||
<p>Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated.
|
||||
If during boarding the Carrier gets airborne, the boarding process will be cancelled.</p>
|
||||
|
||||
<h2>Pickup Cargo</h2>
|
||||
|
||||
<p>If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location.
|
||||
Routing information is shown in flight that directs you to the cargo within Reporting Range.
|
||||
Upon arrival, the Cargo will contact you and further instructions will be given.
|
||||
When your Carrier is airborne, you will receive instructions to land your Carrier.
|
||||
The action will not be completed until you've landed your Carrier.</p>
|
||||
|
||||
|
||||
<h2>Cargo Deploy and UnBoarding</h2>
|
||||
|
||||
<p>Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying <a href="Zone.html">Zone</a> type.
|
||||
The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.</p>
|
||||
|
||||
<h3>UnBoard Cargo</h3>
|
||||
|
||||
<p>If your Carrier is already within a Deployment Zone,
|
||||
then the Cargo Handling Radio Menu allows to <strong>UnBoard</strong> a specific cargo that is
|
||||
loaded within your Carrier group into the Deployment Zone.
|
||||
Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier.
|
||||
Ensure that you stay at the position or stay on the ground while Unboarding.
|
||||
If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.</p>
|
||||
|
||||
<h3>Deploy Cargo</h3>
|
||||
|
||||
<p>If your Carrier is not within a Deployment Zone, you'll need to fly towards one.
|
||||
Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards.
|
||||
Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center.
|
||||
Upon arrival, the HQ will provide you with further instructions.
|
||||
When your Carrier is airborne, you will receive instructions to land your Carrier.
|
||||
The action will not be completed until you've landed your Carrier!</p>
|
||||
|
||||
<h2>Handle TASK_CARGO Events ...</h2>
|
||||
|
||||
<p>The TASK_CARGO classes define <a href="Cargo.html">Cargo</a> transport tasks,
|
||||
based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TASK</a>.</p>
|
||||
|
||||
<h3>Specific TASK_CARGO Events</h3>
|
||||
|
||||
<p>Specific Cargo Handling event can be captured, that allow to trigger specific actions!</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Boarded</strong>: Triggered when the Cargo has been Boarded into your Carrier.</li>
|
||||
<li><strong>UnBoarded</strong>: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Standard TASK_CARGO Events</h3>
|
||||
|
||||
<p>The TASK_CARGO is implemented using a <a href="Statemachine.html##(FSM_TASK)">Statemachine#FSM_TASK</a>, and has the following standard 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>
|
||||
|
||||
<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>
|
||||
|
||||
@ -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>
|
||||
@ -178,18 +179,7 @@ CLIENTS in a SET_CLIENT collection, which are not occupied by human players.</p>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="Cargo.html">Cargo</a></td>
|
||||
<td class="summary">
|
||||
<p>Single-Player:<strong>Yes</strong> / Multi-Player:<strong>Yes</strong> / AI:<strong>Yes</strong> / Human:<strong>No</strong> / Types:<strong>Ground</strong> -- <br/>
|
||||
<strong>Management of logical cargo objects, that can be transported from and to transportation carriers.</strong></p>
|
||||
|
||||
<p><img src="..\Presentations\AI_CARGO\CARGO.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ):</p>
|
||||
|
||||
<ul>
|
||||
<li>AI<em>CARGO</em>UNIT, represented by a <a href="Unit.html">Unit</a> in a <a href="Group.html">Group</a>: Cargo can be represented by a Unit in a Group.</li>
|
||||
</ul>
|
||||
<p><strong>Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -517,6 +507,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>
|
||||
|
||||
@ -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>
|
||||
|
||||
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 198 KiB |
BIN
docs/Presentations/TASK_CARGO/Dia1.JPG
Normal file
|
After Width: | Height: | Size: 218 KiB |