mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge docu changes (#1818)
* Documentation fixes. (#1810) Fix documentation references. Correct spelling errors. Remove empty whitespaces. Correct a single mis-spelled ZONE_BASE variable, see 'Core/Zone.lua' (variable "Sureface" -> "Surface", no references to mis-spelled "Sureface" throughout the codebase). Correct mis-spelling of "coaltion" in 'Functional/Mantis.lua', corrected to "coalition". * Documentation fixes. (#1811) Update documentation text and links. Fix spelling errors. Other minor adjustments where appropriate, such as remove whitespaces and format code. * Documentation fixes. (#1815) Minor documentation and code formatting fixes. This is mostly intended to have something re-trigger the documentation generation to see if the filename capitalization is resolved. * Code formatting preparation. (#1817) Use EmmyLuaCodeStyle that comes with "Lua" VS Code extension (https://marketplace.visualstudio.com/items?itemName=sumneko.lua). More features and configurability than LuaFormatter, and no need for additional extension (beyond "Lua"). Formatting file set up from default template with some tweaks to correspond to most common coding style observed in the code base. Further tweaks are likely required. * Documentation fixes. (#1816) Co-authored-by: TommyC81 <tommyc81@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
--
|
||||
-- ## AIRBASE reference methods
|
||||
--
|
||||
-- For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
-- For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- This is done at the beginning of the mission (when the mission starts).
|
||||
--
|
||||
-- The AIRBASE class **does not contain a :New()** method, rather it provides **:Find()** methods to retrieve the object reference
|
||||
@@ -51,8 +51,8 @@
|
||||
--
|
||||
-- The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:
|
||||
--
|
||||
-- * @{#AIRBASE.Find}(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase object.
|
||||
-- * @{#AIRBASE.FindByName}(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase name.
|
||||
-- * @{#AIRBASE.Find}(): Find a AIRBASE instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Airbase object.
|
||||
-- * @{#AIRBASE.FindByName}(): Find a AIRBASE instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Airbase name.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANITIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).
|
||||
--
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
-- * Handles messages to players.
|
||||
-- * Manage the "state" of the DCS Unit.
|
||||
--
|
||||
-- Clients are being used by the @{MISSION} class to follow players and register their successes.
|
||||
-- Clients are being used by the @{Tasking.Mission#MISSION} class to follow players and register their successes.
|
||||
--
|
||||
-- ## CLIENT reference methods
|
||||
--
|
||||
-- For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
-- For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- This is done at the beginning of the mission (when the mission starts).
|
||||
--
|
||||
-- The CLIENT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
@@ -55,8 +55,8 @@
|
||||
--
|
||||
-- The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:
|
||||
--
|
||||
-- * @{#CLIENT.Find}(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.
|
||||
-- * @{#CLIENT.FindByName}(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.
|
||||
-- * @{#CLIENT.Find}(): Find a CLIENT instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Unit object.
|
||||
-- * @{#CLIENT.FindByName}(): Find a CLIENT instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Unit name.
|
||||
--
|
||||
-- **IMPORTANT: ONE SHOULD NEVER SANITIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).**
|
||||
--
|
||||
|
||||
@@ -3635,7 +3635,7 @@ end
|
||||
|
||||
--- Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.
|
||||
-- Use the method @{#CONTROLLABLE.WayPointFunction}() to define the hook functions for specific waypoints.
|
||||
-- Use the method @{#CONTROLLABLE.WayPointExecute)() to start the execution of the new mission plan.
|
||||
-- Use the method @{#CONTROLLABLE.WayPointExecute}() to start the execution of the new mission plan.
|
||||
-- Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #table WayPoints If WayPoints is given, then use the route.
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
-- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the @{SPAWN} class).
|
||||
-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the @{Core.Spawn} class).
|
||||
--
|
||||
-- The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
-- using the DCS Group or the DCS GroupName.
|
||||
@@ -47,8 +47,8 @@
|
||||
--
|
||||
-- The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance:
|
||||
--
|
||||
-- * @{#GROUP.Find}(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
|
||||
-- * @{#GROUP.FindByName}(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
|
||||
-- * @{#GROUP.Find}(): Find a GROUP instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Group object.
|
||||
-- * @{#GROUP.FindByName}(): Find a GROUP instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Group name.
|
||||
--
|
||||
-- # 1. Tasking of groups
|
||||
--
|
||||
@@ -132,14 +132,14 @@
|
||||
--
|
||||
-- ## GROUP Zone validation methods
|
||||
--
|
||||
-- The group can be validated whether it is completely, partly or not within a @{Zone}.
|
||||
-- The group can be validated whether it is completely, partly or not within a @{Core.Zone}.
|
||||
-- Use the following Zone validation methods on the group:
|
||||
--
|
||||
-- * @{#GROUP.IsCompletelyInZone}: Returns true if all units of the group are within a @{Zone}.
|
||||
-- * @{#GROUP.IsPartlyInZone}: Returns true if some units of the group are within a @{Zone}.
|
||||
-- * @{#GROUP.IsNotInZone}: Returns true if none of the group units of the group are within a @{Zone}.
|
||||
-- * @{#GROUP.IsCompletelyInZone}: Returns true if all units of the group are within a @{Core.Zone}.
|
||||
-- * @{#GROUP.IsPartlyInZone}: Returns true if some units of the group are within a @{Core.Zone}.
|
||||
-- * @{#GROUP.IsNotInZone}: Returns true if none of the group units of the group are within a @{Core.Zone}.
|
||||
--
|
||||
-- The zone can be of any @{Zone} class derived from @{Core.Zone#ZONE_BASE}. So, these methods are polymorphic to the zones tested on.
|
||||
-- The zone can be of any @{Core.Zone} class derived from @{Core.Zone#ZONE_BASE}. So, these methods are polymorphic to the zones tested on.
|
||||
--
|
||||
-- ## GROUP AI methods
|
||||
--
|
||||
@@ -1295,7 +1295,7 @@ end
|
||||
do -- Is Zone methods
|
||||
|
||||
|
||||
--- Check if any unit of a group is inside a @{Zone}.
|
||||
--- Check if any unit of a group is inside a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns `true` if *at least one unit* is inside the zone or `false` if *no* unit is inside.
|
||||
@@ -1324,7 +1324,7 @@ function GROUP:IsInZone( Zone )
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns true if all units of the group are within a @{Zone}.
|
||||
--- Returns true if all units of the group are within a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the Group is completely within the @{Core.Zone#ZONE_BASE}
|
||||
@@ -1344,7 +1344,7 @@ function GROUP:IsCompletelyInZone( Zone )
|
||||
return true
|
||||
end
|
||||
|
||||
--- Returns true if some but NOT ALL units of the group are within a @{Zone}.
|
||||
--- Returns true if some but NOT ALL units of the group are within a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the Group is partially within the @{Core.Zone#ZONE_BASE}
|
||||
@@ -1372,7 +1372,7 @@ function GROUP:IsPartlyInZone( Zone )
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns true if part or all units of the group are within a @{Zone}.
|
||||
--- Returns true if part or all units of the group are within a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the Group is partially or completely within the @{Core.Zone#ZONE_BASE}.
|
||||
@@ -1380,7 +1380,7 @@ function GROUP:IsPartlyOrCompletelyInZone( Zone )
|
||||
return self:IsPartlyInZone(Zone) or self:IsCompletelyInZone(Zone)
|
||||
end
|
||||
|
||||
--- Returns true if none of the group units of the group are within a @{Zone}.
|
||||
--- Returns true if none of the group units of the group are within a @{Core.Zone}.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the Group is not within the @{Core.Zone#ZONE_BASE}
|
||||
@@ -1416,10 +1416,10 @@ function GROUP:IsAnyInZone( Zone )
|
||||
return false
|
||||
end
|
||||
|
||||
--- Returns the number of UNITs that are in the @{Zone}
|
||||
--- Returns the number of UNITs that are in the @{Core.Zone}
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #number The number of UNITs that are in the @{Zone}
|
||||
-- @return #number The number of UNITs that are in the @{Core.Zone}
|
||||
function GROUP:CountInZone( Zone )
|
||||
self:F2( {self.GroupName, Zone} )
|
||||
local Count = 0
|
||||
@@ -1676,7 +1676,7 @@ end
|
||||
|
||||
-- RESPAWNING
|
||||
|
||||
--- Returns the group template from the @{DATABASE} (_DATABASE object).
|
||||
--- Returns the group template from the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- @param #GROUP self
|
||||
-- @return #table
|
||||
function GROUP:GetTemplate()
|
||||
@@ -1684,7 +1684,7 @@ function GROUP:GetTemplate()
|
||||
return UTILS.DeepCopy( _DATABASE:GetGroupTemplate( GroupName ) )
|
||||
end
|
||||
|
||||
--- Returns the group template route.points[] (the waypoints) from the @{DATABASE} (_DATABASE object).
|
||||
--- Returns the group template route.points[] (the waypoints) from the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- @param #GROUP self
|
||||
-- @return #table
|
||||
function GROUP:GetTemplateRoutePoints()
|
||||
@@ -1742,7 +1742,7 @@ function GROUP:InitHeight( Height )
|
||||
end
|
||||
|
||||
|
||||
--- Set the respawn @{Zone} for the respawned group.
|
||||
--- Set the respawn @{Core.Zone} for the respawned group.
|
||||
-- @param #GROUP self
|
||||
-- @param Core.Zone#ZONE Zone The zone in meters.
|
||||
-- @return #GROUP self
|
||||
@@ -1752,7 +1752,7 @@ function GROUP:InitZone( Zone )
|
||||
end
|
||||
|
||||
|
||||
--- Randomize the positions of the units of the respawned group within the @{Zone}.
|
||||
--- Randomize the positions of the units of the respawned group within the @{Core.Zone}.
|
||||
-- When a Respawn happens, the units of the group will be placed at random positions within the Zone (selected).
|
||||
-- @param #GROUP self
|
||||
-- @param #boolean PositionZone true will randomize the positions within the Zone.
|
||||
@@ -1852,9 +1852,9 @@ end
|
||||
-- - @{#GROUP.InitHeading}: Set the heading for the units in degrees within the respawned group.
|
||||
-- - @{#GROUP.InitHeight}: Set the height for the units in meters for the respawned group. (This is applicable for air units).
|
||||
-- - @{#GROUP.InitRandomizeHeading}: Randomize the headings for the units within the respawned group.
|
||||
-- - @{#GROUP.InitZone}: Set the respawn @{Zone} for the respawned group.
|
||||
-- - @{#GROUP.InitRandomizeZones}: Randomize the respawn @{Zone} between one of the @{Zone}s given for the respawned group.
|
||||
-- - @{#GROUP.InitRandomizePositionZone}: Randomize the positions of the units of the respawned group within the @{Zone}.
|
||||
-- - @{#GROUP.InitZone}: Set the respawn @{Core.Zone} for the respawned group.
|
||||
-- - @{#GROUP.InitRandomizeZones}: Randomize the respawn @{Core.Zone} between one of the @{Core.Zone}s given for the respawned group.
|
||||
-- - @{#GROUP.InitRandomizePositionZone}: Randomize the positions of the units of the respawned group within the @{Core.Zone}.
|
||||
-- - @{#GROUP.InitRandomizePositionRadius}: Randomize the positions of the units of the respawned group in a circle band.
|
||||
-- - @{#GROUP.InitRandomizeTemplates}: Randomize the Template for the respawned group.
|
||||
--
|
||||
@@ -2205,7 +2205,7 @@ function GROUP:GetTaskRoute()
|
||||
return routines.utils.deepCopy( _DATABASE.Templates.Groups[self.GroupName].Template.route.points )
|
||||
end
|
||||
|
||||
--- Return the route of a group by using the @{Core.Database#DATABASE} class.
|
||||
--- Return the route of a group by using the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- @param #GROUP self
|
||||
-- @param #number Begin The route point from where the copy will start. The base route point is 0.
|
||||
-- @param #number End The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.
|
||||
|
||||
@@ -725,7 +725,7 @@ function POSITIONABLE:InAir()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns the a @{Velocity} object from the POSITIONABLE.
|
||||
--- Returns the @{Core.Velocity} object from the POSITIONABLE.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @return Core.Velocity#VELOCITY Velocity The Velocity object.
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
@@ -1815,7 +1815,7 @@ function POSITIONABLE:SmokeBlue()
|
||||
trigger.action.smoke( self:GetVec3(), trigger.smokeColor.Blue )
|
||||
end
|
||||
|
||||
--- Returns true if the unit is within a @{Zone}.
|
||||
--- Returns true if the unit is within a @{Core.Zone}.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the unit is within the @{Core.Zone#ZONE_BASE}
|
||||
@@ -1830,7 +1830,7 @@ function POSITIONABLE:IsInZone( Zone )
|
||||
return false
|
||||
end
|
||||
|
||||
--- Returns true if the unit is not within a @{Zone}.
|
||||
--- Returns true if the unit is not within a @{Core.Zone}.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param Core.Zone#ZONE_BASE Zone The zone to test.
|
||||
-- @return #boolean Returns true if the unit is not within the @{Core.Zone#ZONE_BASE}
|
||||
|
||||
@@ -26,19 +26,19 @@
|
||||
--
|
||||
-- ## STATIC reference methods
|
||||
--
|
||||
-- For each DCS Static will have a STATIC wrapper object (instance) within the _@{DATABASE} object.
|
||||
-- For each DCS Static will have a STATIC wrapper object (instance) within the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- This is done at the beginning of the mission (when the mission starts).
|
||||
--
|
||||
-- The STATIC class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
-- The @{#STATIC} class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference
|
||||
-- using the Static Name.
|
||||
--
|
||||
-- Another thing to know is that STATIC objects do not "contain" the DCS Static object.
|
||||
-- The STATIc methods will reference the DCS Static object by name when it is needed during API execution.
|
||||
-- The @{#STATIC} methods will reference the DCS Static object by name when it is needed during API execution.
|
||||
-- If the DCS Static object does not exist or is nil, the STATIC methods will return nil and log an exception in the DCS.log file.
|
||||
--
|
||||
-- The STATIc class provides the following functions to retrieve quickly the relevant STATIC instance:
|
||||
-- The @{#STATIC} class provides the following functions to retrieve quickly the relevant STATIC instance:
|
||||
--
|
||||
-- * @{#STATIC.FindByName}(): Find a STATIC instance from the _DATABASE object using a DCS Static name.
|
||||
-- * @{#STATIC.FindByName}(): Find a STATIC instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Static name.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANITIZE these STATIC OBJECT REFERENCES! (make the STATIC object references nil).
|
||||
--
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
-- @field #string GroupName Name of the group the unit belongs to.
|
||||
-- @extends Wrapper.Controllable#CONTROLLABLE
|
||||
|
||||
--- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} object.
|
||||
-- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the @{SPAWN} class).
|
||||
--- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the global _DATABASE object (an instance of @{Core.Database#DATABASE}).
|
||||
-- This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the @{Core.Spawn} class).
|
||||
--
|
||||
-- The UNIT class **does not contain a :New()** method, rather it provides **:Find()** methods to retrieve the object reference
|
||||
-- using the DCS Unit or the DCS UnitName.
|
||||
@@ -39,8 +39,8 @@
|
||||
--
|
||||
-- The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:
|
||||
--
|
||||
-- * @{#UNIT.Find}(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
|
||||
-- * @{#UNIT.FindByName}(): Find a UNIT instance from the _DATABASE object using a DCS Unit name.
|
||||
-- * @{#UNIT.Find}(): Find a UNIT instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Unit object.
|
||||
-- * @{#UNIT.FindByName}(): Find a UNIT instance from the global _DATABASE object (an instance of @{Core.Database#DATABASE}) using a DCS Unit name.
|
||||
--
|
||||
-- IMPORTANT: ONE SHOULD NEVER SANITIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||
--
|
||||
@@ -644,7 +644,7 @@ end
|
||||
-- Need to add here functions to check if radar is on and which object etc.
|
||||
|
||||
--- Returns the prefix name of the DCS Unit. A prefix name is a part of the name before a '#'-sign.
|
||||
-- DCS Units spawned with the @{SPAWN} class contain a '#'-sign to indicate the end of the (base) DCS Unit name.
|
||||
-- DCS Units spawned with the @{Core.Spawn#SPAWN} class contain a '#'-sign to indicate the end of the (base) DCS Unit name.
|
||||
-- The spawn sequence number and unit number are contained within the name after the '#' sign.
|
||||
-- @param #UNIT self
|
||||
-- @return #string The name of the DCS Unit.
|
||||
|
||||
Reference in New Issue
Block a user