Optimized comments and documentation set

This commit is contained in:
FlightControl_Master
2018-05-23 10:42:27 +02:00
parent fe2f59660d
commit 1b39f5d6e6
83 changed files with 538 additions and 525 deletions
+8 -8
View File
@@ -16,7 +16,7 @@
--
-- ===
--
-- @module Cargo
-- @module Cargo.Cargo
-- Events
@@ -152,7 +152,7 @@ do -- CARGO
-- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit.
-- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit.
--- # (R2.4) CARGO class, extends @{Fsm#FSM_PROCESS}
--- # (R2.4) CARGO class, extends @{Core.Fsm#FSM_PROCESS}
--
-- The CARGO class defines the core functions that defines a cargo object within MOOSE.
-- A cargo is a **logical object** defined that is available for transport, and has a life status within a simulation.
@@ -708,11 +708,11 @@ do -- CARGO
return self
end
--- Send a CC message to a @{Group}.
--- Send a CC message to a @{Wrapper.Group}.
-- @param #CARGO self
-- @param #string Message
-- @param Wrapper.Group#GROUP CarrierGroup The Carrier Group.
-- @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.
-- @param #string 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 CARGO:MessageToGroup( Message, CarrierGroup, Name )
MESSAGE:New( Message, 20, "Cargo " .. self:GetName() ):ToGroup( CarrierGroup )
@@ -864,11 +864,11 @@ do -- CARGO_REPRESENTABLE
return self
end
--- Send a message to a @{Group} through a communication channel near the cargo.
--- Send a message to a @{Wrapper.Group} through a communication channel near the cargo.
-- @param #CARGO_REPRESENTABLE self
-- @param #string Message
-- @param Wrapper.Group#GROUP TaskGroup
-- @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.
-- @param #string 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 CARGO_REPRESENTABLE:MessageToGroup( Message, TaskGroup, Name )
local CoordinateZone = ZONE_RADIUS:New( "Zone" , self:GetCoordinate():GetVec2(), 500 )
@@ -916,11 +916,11 @@ do -- CARGO_REPORTABLE
return self
end
--- Send a CC message to a @{Group}.
--- Send a CC message to a @{Wrapper.Group}.
-- @param #CARGO_REPORTABLE self
-- @param #string Message
-- @param Wrapper.Group#GROUP TaskGroup
-- @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.
-- @param #string 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 CARGO_REPORTABLE:MessageToGroup( Message, TaskGroup, Name )
MESSAGE:New( Message, 20, "Cargo " .. self:GetName() .. " reporting" ):ToGroup( TaskGroup )
+4 -4
View File
@@ -17,7 +17,7 @@
--
-- ===
--
-- @module CargoCrate
-- @module Cargo.CargoCrate
do -- CARGO_CRATE
@@ -25,7 +25,7 @@ do -- CARGO_CRATE
-- @type CARGO_CRATE
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
--- # CARGO\_CRATE class, extends @{#CARGO_REPRESENTABLE}
--- # CARGO\_CRATE class, extends @{Cargo.Cargo#CARGO_REPRESENTABLE}
--
-- The CARGO\_CRATE class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO\_CRATE objects to and from carriers.
@@ -165,7 +165,7 @@ do -- CARGO_CRATE
end
--- Check if Cargo Crate is in the radius for the Cargo to be reported.
-- @param #CARGO self
-- @param #CARGO_CRATE self
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Crate is within the report radius.
function CARGO_CRATE:IsInReportRadius( Coordinate )
@@ -185,7 +185,7 @@ do -- CARGO_CRATE
--- Check if Cargo Crate is in the radius for the Cargo to be Boarded or Loaded.
-- @param #CARGO self
-- @param #CARGO_CRATE self
-- @param Core.Point#Coordinate Coordinate
-- @return #boolean true if the Cargo Crate is within the loading radius.
function CARGO_CRATE:IsInLoadRadius( Coordinate )
+11 -11
View File
@@ -1,4 +1,4 @@
--- **Cargo** -- Management of grouped cargo logistics, which are based on a @{Group} object.
--- **Cargo** -- Management of grouped cargo logistics, which are based on a @{Wrapper.Group} object.
--
-- ===
--
@@ -17,7 +17,7 @@
--
-- ===
--
-- @module CargoGroup
-- @module Cargo.CargoGroup
do -- CARGO_GROUP
@@ -27,9 +27,9 @@ do -- CARGO_GROUP
-- @field Core.Set#SET_CARGO CargoSet The collection of derived CARGO objects.
-- @field #string GroupName The name of the CargoGroup.
--- # CARGO\_GROUP class
--- # CARGO\_GROUP class, extends @{Cargo.Cargo#CARGO_REPORTABLE}
--
-- The CARGO\_GROUP class defines a cargo that is represented by a @{Group} object within the simulator.
-- The CARGO\_GROUP class defines a cargo that is represented by a @{Wrapper.Group} object within the simulator.
-- The cargo can be Loaded, UnLoaded, Boarded, UnBoarded to and from Carriers.
--
-- The above cargo classes are used by the AI\_CARGO\_ classes to allow AI groups to transport cargo:
@@ -53,7 +53,7 @@ do -- CARGO_GROUP
}
--- CARGO_GROUP constructor.
-- This make a new CARGO_GROUP from a @{Group} object.
-- This make a new CARGO_GROUP from a @{Wrapper.Group} object.
-- It will "ungroup" the group object within the sim, and will create a @{Set} of individual Unit objects.
-- @param #CARGO_GROUP self
-- @param Wrapper.Group#GROUP CargoGroup
@@ -233,7 +233,7 @@ do -- CARGO_GROUP
if self:IsDestroyed() or self:IsUnLoaded() or self:IsBoarding() or self:IsUnboarding() then
Destroyed = true
for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do
local Cargo = CargoData -- #CARGO
local Cargo = CargoData -- Cargo.Cargo#CARGO
if Cargo:IsAlive() then
Destroyed = false
else
@@ -667,7 +667,7 @@ do -- CARGO_GROUP
self:F( { "Respawning" } )
for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do
local Cargo = CargoData -- #CARGO
local Cargo = CargoData -- Cargo.Cargo#CARGO
Cargo:Destroy()
Cargo:SetStartState( "UnLoaded" )
end
@@ -713,7 +713,7 @@ do -- CARGO_GROUP
-- @param Utilities.Utils#FLARECOLOR FlareColor
function CARGO_GROUP:Flare( FlareColor )
local Cargo = self.CargoSet:GetFirst() -- #CARGO
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
Cargo:Flare( FlareColor )
end
@@ -725,7 +725,7 @@ do -- CARGO_GROUP
-- @param #number Radius The radius of randomization around the center of the first element of the CargoGroup.
function CARGO_GROUP:Smoke( SmokeColor, Radius )
local Cargo = self.CargoSet:GetFirst() -- #CARGO
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
Cargo:Smoke( SmokeColor, Radius )
@@ -733,14 +733,14 @@ do -- CARGO_GROUP
end
--- Check if the first element of the CargoGroup is the given @{Zone}.
-- @param #CARGO self
-- @param #CARGO_GROUP self
-- @param Core.Zone#ZONE_BASE Zone
-- @return #boolean **true** if the first element of the CargoGroup is in the Zone
-- @return #boolean **false** if there is no element of the CargoGroup in the Zone.
function CARGO_GROUP:IsInZone( Zone )
--self:F( { Zone } )
local Cargo = self.CargoSet:GetFirst() -- #CARGO
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
return Cargo:IsInZone( Zone )
@@ -17,7 +17,7 @@
--
-- ===
--
-- @module CargoCrate
-- @module Cargo.CargoSlingload
do -- CARGO_SLINGLOAD
@@ -26,7 +26,7 @@ do -- CARGO_SLINGLOAD
-- @type CARGO_SLINGLOAD
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
--- # CARGO\_CRATE class, extends @{#CARGO_REPRESENTABLE}
--- # CARGO\_CRATE class, extends @{Cargo.Cargo#CARGO_REPRESENTABLE}
--
-- The CARGO\_CRATE class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
--
@@ -87,8 +87,8 @@ do -- CARGO_SLINGLOAD
--- Check if the cargo can be Slingloaded.
-- @param #CARGO self
function CARGO:CanSlingload()
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanSlingload()
return true
end
+3 -3
View File
@@ -1,4 +1,4 @@
--- **Cargo** -- Management of single cargo logistics, which are based on a @{Unit} object.
--- **Cargo** -- Management of single cargo logistics, which are based on a @{Wrapper.Unit} object.
--
-- ===
--
@@ -17,7 +17,7 @@
--
-- ===
--
-- @module CargoUnit
-- @module Cargo.CargoUnit
do -- CARGO_UNIT
@@ -25,7 +25,7 @@ do -- CARGO_UNIT
-- @type CARGO_UNIT
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
--- # CARGO\_UNIT class, extends @{#CARGO_REPRESENTABLE}
--- # CARGO\_UNIT class, extends @{Cargo.Cargo#CARGO_REPRESENTABLEE}
--
-- The CARGO\_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO\_UNIT objects to and from carriers.