From 7455c637165e07bf94a38dde70ab71952b43170b Mon Sep 17 00:00:00 2001 From: TommyC81 Date: Sun, 23 Oct 2022 18:45:40 +0400 Subject: [PATCH] Documentation fixes. (#1811) Update documentation text and links. Fix spelling errors. Other minor adjustments where appropriate, such as remove whitespaces and format code. --- .../Moose/AI/AI_A2A_Dispatcher.lua | 4 +- Moose Development/Moose/AI/AI_A2A_Patrol.lua | 8 +-- Moose Development/Moose/AI/AI_Air.lua | 65 +++++++++--------- Moose Development/Moose/AI/AI_Air_Patrol.lua | 4 +- Moose Development/Moose/AI/AI_Formation.lua | 2 +- Moose Development/Moose/AI/AI_Patrol.lua | 68 +++++++++---------- .../Moose/Actions/Act_Account.lua | 2 +- Moose Development/Moose/Cargo/CargoGroup.lua | 2 +- Moose Development/Moose/Core/Database.lua | 14 ++-- Moose Development/Moose/Core/Event.lua | 4 +- Moose Development/Moose/Core/Fsm.lua | 12 ++-- Moose Development/Moose/Core/Set.lua | 22 +++--- Moose Development/Moose/Core/Spawn.lua | 12 ++-- .../Moose/Functional/Designate.lua | 4 +- .../Moose/Functional/Detection.lua | 16 ++--- .../Moose/Functional/DetectionZones.lua | 2 +- .../Moose/Functional/MissileTrainer.lua | 8 +-- .../Moose/Functional/Movement.lua | 22 +++--- Moose Development/Moose/Functional/Range.lua | 2 +- Moose Development/Moose/Globals.lua | 18 ++--- .../Moose/Tasking/DetectionManager.lua | 2 +- Moose Development/Moose/Tasking/Mission.lua | 24 +++---- Moose Development/Moose/Tasking/Task_A2A.lua | 2 +- .../Moose/Tasking/Task_A2A_Dispatcher.lua | 2 +- Moose Development/Moose/Tasking/Task_A2G.lua | 2 +- .../Moose/Tasking/Task_A2G_Dispatcher.lua | 22 +++--- Moose Development/Moose/Wrapper/Airbase.lua | 6 +- Moose Development/Moose/Wrapper/Client.lua | 8 +-- Moose Development/Moose/Wrapper/Group.lua | 14 ++-- .../Moose/Wrapper/Positionable.lua | 2 +- Moose Development/Moose/Wrapper/Static.lua | 10 +-- Moose Development/Moose/Wrapper/Unit.lua | 10 +-- 32 files changed, 197 insertions(+), 198 deletions(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index 4381880b8..9b497ac76 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -57,8 +57,8 @@ -- -- ## 2. Which type of EWR will I setup? Grouping based per AREA, per TYPE or per UNIT? (Later others will follow). -- --- The MOOSE framework leverages the @{Detection} classes to perform the EWR detection. --- Several types of @{Detection} classes exist, and the most common characteristics of these classes is that they: +-- The MOOSE framework leverages the @{Functional.Detection} classes to perform the EWR detection. +-- Several types of @{Functional.Detection} classes exist, and the most common characteristics of these classes is that they: -- -- * Perform detections from multiple FACs as one co-operating entity. -- * Communicate with a Head Quarters, which consolidates each detection. diff --git a/Moose Development/Moose/AI/AI_A2A_Patrol.lua b/Moose Development/Moose/AI/AI_A2A_Patrol.lua index e4ce9dd1b..aa297b017 100644 --- a/Moose Development/Moose/AI/AI_A2A_Patrol.lua +++ b/Moose Development/Moose/AI/AI_A2A_Patrol.lua @@ -102,7 +102,7 @@ -- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel threshold is calculated. -- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, --- while a new AI is targetted to the AI_A2A_PATROL. +-- while a new AI is targeted to the AI_A2A_PATROL. -- Once the time is finished, the old AI will return to the base. -- Use the method @{#AI_A2A_PATROL.ManageFuel}() to have this proces in place. -- @@ -264,7 +264,7 @@ function AI_A2A_PATROL:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{AI.AI_Patrol#AI_PATROL_ZONE} parameters and settings. -- @param #AI_A2A_PATROL self -- @return #AI_A2A_PATROL self -- @param Wrapper.Group#GROUP AIPatrol The Group Object managed by the FSM. @@ -287,7 +287,7 @@ function AI_A2A_PATROL:onafterPatrol( AIPatrol, From, Event, To ) end ---- This statis method is called from the route path within the last task at the last waaypoint of the AIPatrol. +--- This static method is called from the route path within the last task at the last waypoint of the AIPatrol. -- Note that this method is required, as triggers the next route when patrolling for the AIPatrol. -- @param Wrapper.Group#GROUP AIPatrol The AI group. -- @param #AI_A2A_PATROL Fsm The FSM. @@ -302,7 +302,7 @@ function AI_A2A_PATROL.PatrolRoute( AIPatrol, Fsm ) end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{AI.AI_Patrol#AI_PATROL_ZONE} parameters and settings. -- @param #AI_A2A_PATROL self -- @param Wrapper.Group#GROUP AIPatrol The Group managed by the FSM. -- @param #string From The From State string. diff --git a/Moose Development/Moose/AI/AI_Air.lua b/Moose Development/Moose/AI/AI_Air.lua index 62c1f4a00..dea3ee2a8 100644 --- a/Moose Development/Moose/AI/AI_Air.lua +++ b/Moose Development/Moose/AI/AI_Air.lua @@ -374,7 +374,7 @@ end --- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel threshold is calculated. --- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_AIR. +-- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targeted to the AI_AIR. -- Once the time is finished, the old AI will return to the base. -- @param #AI_AIR self -- @param #number FuelThresholdPercentage The threshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel. @@ -409,7 +409,7 @@ end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{AI.AI_Patrol#AI_PATROL_ZONE} parameters and settings. -- @param #AI_AIR self -- @return #AI_AIR self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. @@ -473,27 +473,27 @@ function AI_AIR:onafterStatus() -- self:Home( "Destroy" ) -- end -- end - + if not self:Is( "Fuel" ) and not self:Is( "Home" ) and not self:is( "Refuelling" )then - + local Fuel = self.Controllable:GetFuelMin() - + -- If the fuel in the controllable is below the threshold percentage, -- then send for refuel in case of a tanker, otherwise RTB. if Fuel < self.FuelThresholdPercentage then - + if self.TankerName then self:I( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... Refuelling at Tanker!" ) self:Refuel() else self:I( self.Controllable:GetName() .. " is out of fuel: " .. Fuel .. " ... RTB!" ) local OldAIControllable = self.Controllable - + local OrbitTask = OldAIControllable:TaskOrbitCircle( math.random( self.PatrolFloorAltitude, self.PatrolCeilingAltitude ), self.PatrolMinSpeed ) local TimedOrbitTask = OldAIControllable:TaskControlled( OrbitTask, OldAIControllable:TaskCondition(nil,nil,nil,nil,self.OutOfFuelOrbitTime,nil ) ) OldAIControllable:SetTask( TimedOrbitTask, 10 ) - + self:Fuel() RTB = true end @@ -504,11 +504,11 @@ function AI_AIR:onafterStatus() if self:Is( "Fuel" ) and not self:Is( "Home" ) and not self:is( "Refuelling" ) then RTB = true end - + -- TODO: Check GROUP damage function. local Damage = self.Controllable:GetLife() local InitialLife = self.Controllable:GetLife0() - + -- If the group is damaged, then RTB. -- Note that a group can consist of more units, so if one unit is damaged of a group, the mission may continue. -- The damaged unit will RTB due to DCS logic, and the others will continue to engage. @@ -518,7 +518,7 @@ function AI_AIR:onafterStatus() RTB = true self:SetStatusOff() end - + -- Check if planes went RTB and are out of control. -- We only check if planes are out of control, when they are in duty. if self.Controllable:HasTask() == false then @@ -532,7 +532,7 @@ function AI_AIR:onafterStatus() self:Damaged() else self:I( self.Controllable:GetName() .. " control lost! " ) - + self:LostControl() end else @@ -550,7 +550,7 @@ function AI_AIR:onafterStatus() if not self:Is("Home") then self:__Status( 10 ) end - + end end @@ -559,11 +559,11 @@ end function AI_AIR.RTBRoute( AIGroup, Fsm ) AIGroup:F( { "AI_AIR.RTBRoute:", AIGroup:GetName() } ) - + if AIGroup:IsAlive() then Fsm:RTB() end - + end --- @param Wrapper.Group#GROUP AIGroup @@ -576,7 +576,7 @@ function AI_AIR.RTBHold( AIGroup, Fsm ) local Task = AIGroup:TaskOrbitCircle( 4000, 400 ) AIGroup:SetTask( Task ) end - + end --- Set the min and max factors on RTB speed. Use this, if your planes are heading back to base too fast. Default values are 0.5 and 0.6. @@ -598,54 +598,53 @@ end function AI_AIR:onafterRTB( AIGroup, From, Event, To ) self:F( { AIGroup, From, Event, To } ) - - if AIGroup and AIGroup:IsAlive() then + if AIGroup and AIGroup:IsAlive() then self:T( "Group " .. AIGroup:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" ) - + self:ClearTargetDistance() --AIGroup:ClearTasks() - + AIGroup:OptionProhibitAfterburner(true) - + local EngageRoute = {} --- Calculate the target route point. - + local FromCoord = AIGroup:GetCoordinate() local ToTargetCoord = self.HomeAirbase:GetCoordinate() -- coordinate is on land height(!) local ToTargetVec3 = ToTargetCoord:GetVec3() ToTargetVec3.y = ToTargetCoord:GetLandHeight()+3000 -- let's set this 1000m/3000 feet above ground local ToTargetCoord2 = COORDINATE:NewFromVec3( ToTargetVec3 ) - + if not self.RTBMinSpeed or not self.RTBMaxSpeed then local RTBSpeedMax = AIGroup:GetSpeedMax() local RTBSpeedMaxFactor = self.RTBSpeedMaxFactor or 0.6 local RTBSpeedMinFactor = self.RTBSpeedMinFactor or 0.5 self:SetRTBSpeed( RTBSpeedMax * RTBSpeedMinFactor, RTBSpeedMax * RTBSpeedMaxFactor) end - + local RTBSpeed = math.random( self.RTBMinSpeed, self.RTBMaxSpeed ) --local ToAirbaseAngle = FromCoord:GetAngleDegrees( FromCoord:GetDirectionVec3( ToTargetCoord2 ) ) local Distance = FromCoord:Get2DDistance( ToTargetCoord2 ) - + --local ToAirbaseCoord = FromCoord:Translate( 5000, ToAirbaseAngle ) local ToAirbaseCoord = ToTargetCoord2 - + if Distance < 5000 then self:I( "RTB and near the airbase!" ) self:Home() return end - + if not AIGroup:InAir() == true then self:I( "Not anymore in the air, considered Home." ) self:Home() return end - - + + --- Create a route point of type air. local FromRTBRoutePoint = FromCoord:WaypointAir( self.PatrolAltType, @@ -666,10 +665,10 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To ) EngageRoute[#EngageRoute+1] = FromRTBRoutePoint EngageRoute[#EngageRoute+1] = ToRTBRoutePoint - + local Tasks = {} Tasks[#Tasks+1] = AIGroup:TaskFunction( "AI_AIR.RTBRoute", self ) - + EngageRoute[#EngageRoute].task = AIGroup:TaskCombo( Tasks ) AIGroup:OptionROEHoldFire() @@ -677,9 +676,9 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To ) --- NOW ROUTE THE GROUP! AIGroup:Route( EngageRoute, self.TaskDelay ) - + end - + end --- @param #AI_AIR self diff --git a/Moose Development/Moose/AI/AI_Air_Patrol.lua b/Moose Development/Moose/AI/AI_Air_Patrol.lua index d81ee109d..d354ded6f 100644 --- a/Moose Development/Moose/AI/AI_Air_Patrol.lua +++ b/Moose Development/Moose/AI/AI_Air_Patrol.lua @@ -244,7 +244,7 @@ function AI_AIR_PATROL:SetRaceTrackPattern(LegMin, LegMax, HeadingMin, HeadingMa end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{AI.AI_Patrol#AI_PATROL_ZONE} parameters and settings. -- @param #AI_AIR_PATROL self -- @return #AI_AIR_PATROL self -- @param Wrapper.Group#GROUP AIPatrol The Group Object managed by the FSM. @@ -280,7 +280,7 @@ function AI_AIR_PATROL.___PatrolRoute( AIPatrol, Fsm ) end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{AI.AI_Patrol#AI_PATROL_ZONE} parameters and settings. -- @param #AI_AIR_PATROL self -- @param Wrapper.Group#GROUP AIPatrol The Group managed by the FSM. -- @param #string From The From State string. diff --git a/Moose Development/Moose/AI/AI_Formation.lua b/Moose Development/Moose/AI/AI_Formation.lua index efeced701..657f8aa2a 100644 --- a/Moose Development/Moose/AI/AI_Formation.lua +++ b/Moose Development/Moose/AI/AI_Formation.lua @@ -41,7 +41,7 @@ --- Build large formations, make AI follow a @{Wrapper.Client#CLIENT} (player) leader or a @{Wrapper.Unit#UNIT} (AI) leader. -- --- AI_FORMATION makes AI @{GROUP}s fly in formation of various compositions. +-- AI_FORMATION makes AI @{Wrapper.Group#GROUP}s fly in formation of various compositions. -- The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!! -- The purpose of the class is to: -- diff --git a/Moose Development/Moose/AI/AI_Patrol.lua b/Moose Development/Moose/AI/AI_Patrol.lua index f741c08db..beba94951 100644 --- a/Moose Development/Moose/AI/AI_Patrol.lua +++ b/Moose Development/Moose/AI/AI_Patrol.lua @@ -135,15 +135,15 @@ -- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel threshold is calculated. -- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, --- while a new AI is targetted to the AI_PATROL_ZONE. +-- while a new AI is targeted to the AI_PATROL_ZONE. -- Once the time is finished, the old AI will return to the base. --- Use the method @{#AI_PATROL_ZONE.ManageFuel}() to have this proces in place. +-- Use the method @{#AI_PATROL_ZONE.ManageFuel}() to have this process in place. -- -- ## 7. Manage "damage" behaviour of the AI in the AI_PATROL_ZONE -- -- When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on. -- Therefore, when the damage threshold is reached, the AI will return immediately to the home base (RTB). --- Use the method @{#AI_PATROL_ZONE.ManageDamage}() to have this proces in place. +-- Use the method @{#AI_PATROL_ZONE.ManageDamage}() to have this process in place. -- -- === -- @@ -170,27 +170,27 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- Inherits from BASE local self = BASE:Inherit( self, FSM_CONTROLLABLE:New() ) -- #AI_PATROL_ZONE - - + + self.PatrolZone = PatrolZone self.PatrolFloorAltitude = PatrolFloorAltitude self.PatrolCeilingAltitude = PatrolCeilingAltitude self.PatrolMinSpeed = PatrolMinSpeed self.PatrolMaxSpeed = PatrolMaxSpeed - + -- defafult PatrolAltType to "BARO" if not specified self.PatrolAltType = PatrolAltType or "BARO" - + self:SetRefreshTimeInterval( 30 ) - + self.CheckStatus = true - + self:ManageFuel( .2, 60 ) self:ManageDamage( 1 ) - + self.DetectedUnits = {} -- This table contains the targets detected during patrol. - + self:SetStartState( "None" ) self:AddTransition( "*", "Stop", "Stopped" ) @@ -228,7 +228,7 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. - + --- Synchronous Event Trigger for Event Stop. -- @function [parent=#AI_PATROL_ZONE] Stop -- @param #AI_PATROL_ZONE self @@ -256,7 +256,7 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. - + --- Synchronous Event Trigger for Event Start. -- @function [parent=#AI_PATROL_ZONE] Start -- @param #AI_PATROL_ZONE self @@ -329,7 +329,7 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. - + --- Synchronous Event Trigger for Event Status. -- @function [parent=#AI_PATROL_ZONE] Status -- @param #AI_PATROL_ZONE self @@ -413,7 +413,7 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. - + --- Synchronous Event Trigger for Event RTB. -- @function [parent=#AI_PATROL_ZONE] RTB -- @param #AI_PATROL_ZONE self @@ -441,11 +441,11 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit -- @param #string To The To State string. self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE. - + self:AddTransition( "*", "Eject", "*" ) self:AddTransition( "*", "Crash", "Crashed" ) self:AddTransition( "*", "PilotDead", "*" ) - + return self end @@ -459,7 +459,7 @@ end -- @return #AI_PATROL_ZONE self function AI_PATROL_ZONE:SetSpeed( PatrolMinSpeed, PatrolMaxSpeed ) self:F2( { PatrolMinSpeed, PatrolMaxSpeed } ) - + self.PatrolMinSpeed = PatrolMinSpeed self.PatrolMaxSpeed = PatrolMaxSpeed end @@ -473,7 +473,7 @@ end -- @return #AI_PATROL_ZONE self function AI_PATROL_ZONE:SetAltitude( PatrolFloorAltitude, PatrolCeilingAltitude ) self:F2( { PatrolFloorAltitude, PatrolCeilingAltitude } ) - + self.PatrolFloorAltitude = PatrolFloorAltitude self.PatrolCeilingAltitude = PatrolCeilingAltitude end @@ -582,7 +582,7 @@ end --- When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -- Therefore, with a parameter and a calculation of the distance to the home base, the fuel threshold is calculated. --- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROL_ZONE. +-- When the fuel threshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targeted to the AI_PATROL_ZONE. -- Once the time is finished, the old AI will return to the base. -- @param #AI_PATROL_ZONE self -- @param #number PatrolFuelThresholdPercentage The threshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel. @@ -592,7 +592,7 @@ function AI_PATROL_ZONE:ManageFuel( PatrolFuelThresholdPercentage, PatrolOutOfFu self.PatrolFuelThresholdPercentage = PatrolFuelThresholdPercentage self.PatrolOutOfFuelOrbitTime = PatrolOutOfFuelOrbitTime - + return self end @@ -609,28 +609,28 @@ function AI_PATROL_ZONE:ManageDamage( PatrolDamageThreshold ) self.PatrolManageDamage = true self.PatrolDamageThreshold = PatrolDamageThreshold - + return self end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{#AI_PATROL_ZONE} parameters and settings. -- @param #AI_PATROL_ZONE self --- @return #AI_PATROL_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. -- @param #string Event The Event string. -- @param #string To The To State string. +-- @return #AI_PATROL_ZONE self function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To ) self:F2() self:__Route( 1 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. self:__Status( 60 ) -- Check status status every 30 seconds. self:SetDetectionActivated() - + self:HandleEvent( EVENTS.PilotDead, self.OnPilotDead ) self:HandleEvent( EVENTS.Crash, self.OnCrash ) self:HandleEvent( EVENTS.Ejection, self.OnEjection ) - + Controllable:OptionROEHoldFire() Controllable:OptionROTVertical() @@ -667,12 +667,12 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) if TargetObject and TargetObject:isExist() and TargetObject.id_ < 50000000 then local TargetUnit = UNIT:Find( TargetObject ) - + -- Check that target is alive due to issue https://github.com/FlightControl-Master/MOOSE/issues/1234 if TargetUnit and TargetUnit:IsAlive() then - + local TargetUnitName = TargetUnit:GetName() - + if self.DetectionZone then if TargetUnit:IsInZone( self.DetectionZone ) then self:T( {"Detected ", TargetUnit } ) @@ -687,13 +687,13 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) end Detected = true end - + end end end self:__Detect( -self.DetectInterval ) - + if Detected == true then self:__Detected( 1.5 ) end @@ -701,7 +701,7 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable --- This statis method is called from the route path within the last task at the last waaypoint of the Controllable. +-- This static method is called from the route path within the last task at the last waypoint of the Controllable. -- Note that this method is required, as triggers the next route when patrolling for the Controllable. function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable ) @@ -710,7 +710,7 @@ function AI_PATROL_ZONE:_NewPatrolRoute( AIControllable ) end ---- Defines a new patrol route using the @{Process_PatrolZone} parameters and settings. +--- Defines a new patrol route using the @{#AI_PATROL_ZONE} parameters and settings. -- @param #AI_PATROL_ZONE self -- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM. -- @param #string From The From State string. @@ -729,7 +729,7 @@ function AI_PATROL_ZONE:onafterRoute( Controllable, From, Event, To ) if self.Controllable:IsAlive() and life > 1 then -- Determine if the AIControllable is within the PatrolZone. -- If not, make a waypoint within the to that the AIControllable will fly at maximum speed to that point. - + local PatrolRoute = {} -- Calculate the current route point of the controllable as the start point of the route. diff --git a/Moose Development/Moose/Actions/Act_Account.lua b/Moose Development/Moose/Actions/Act_Account.lua index fc9dcc724..fe79bbbb7 100644 --- a/Moose Development/Moose/Actions/Act_Account.lua +++ b/Moose Development/Moose/Actions/Act_Account.lua @@ -140,7 +140,7 @@ do -- ACT_ACCOUNT_DEADS --- # @{#ACT_ACCOUNT_DEADS} FSM class, extends @{Core.Fsm.Account#ACT_ACCOUNT} -- -- The ACT_ACCOUNT_DEADS class accounts (detects, counts and reports) successful kills of DCS units. - -- The process is given a @{Set} of units that will be tracked upon successful destruction. + -- The process is given a @{Core.Set} of units that will be tracked upon successful destruction. -- The process will end after each target has been successfully destroyed. -- Each successful dead will trigger an Account state transition that can be scored, modified or administered. -- diff --git a/Moose Development/Moose/Cargo/CargoGroup.lua b/Moose Development/Moose/Cargo/CargoGroup.lua index 5b5083574..1369464f3 100644 --- a/Moose Development/Moose/Cargo/CargoGroup.lua +++ b/Moose Development/Moose/Cargo/CargoGroup.lua @@ -47,7 +47,7 @@ do -- CARGO_GROUP --- CARGO_GROUP constructor. -- 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. + -- It will "ungroup" the group object within the sim, and will create a @{Core.Set} of individual Unit objects. -- @param #CARGO_GROUP self -- @param Wrapper.Group#GROUP CargoGroup Group to be transported as cargo. -- @param #string Type Cargo type, e.g. "Infantry". This is the type used in SET_CARGO:New():FilterTypes("Infantry") to define the valid cargo groups of the set. diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index b4ea55e57..1b5fba242 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -51,7 +51,7 @@ -- * PLAYERS -- * CARGOS -- --- On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor. +-- On top, for internal MOOSE administration purposes, the DATABASE administers the Unit and Group TEMPLATES as defined within the Mission Editor. -- -- The singleton object **_DATABASE** is automatically created by MOOSE, that administers all objects within the mission. -- Moose refers to **_DATABASE** within the framework extensively, but you can also refer to the _DATABASE object within your missions if required. @@ -322,7 +322,7 @@ do -- Zones -- Store color of zone. Zone.Color=color - + -- Store zone ID. Zone.ZoneID=ZoneData.zoneId @@ -777,7 +777,7 @@ function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, Category local StaticTemplate = UTILS.DeepCopy( StaticTemplate ) local StaticTemplateGroupName = env.getValueDictByKey(StaticTemplate.name) - + local StaticTemplateName=StaticTemplate.units[1].name self.Templates.Statics[StaticTemplateName] = self.Templates.Statics[StaticTemplateName] or {} @@ -1153,11 +1153,11 @@ function DATABASE:_EventOnDeadOrCrash( Event ) if self.STATICS[Event.IniDCSUnitName] then self:DeleteStatic( Event.IniDCSUnitName ) end - + --- -- Maybe a UNIT? --- - + -- Delete unit. if self.UNITS[Event.IniDCSUnitName] then self:T("STATIC Event for UNIT "..tostring(Event.IniDCSUnitName)) @@ -1556,11 +1556,11 @@ function DATABASE:FindOpsGroupFromUnit(unitname) else unit=unitname end - + if unit then groupname=unit:GetGroup():GetName() end - + if groupname then return self.FLIGHTGROUPS[groupname] else diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index 6c81f7dab..0b239f2d4 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -35,7 +35,7 @@ -- There are 5 types/levels of objects that the _EVENTDISPATCHER services: -- -- * _DATABASE object: The core of the MOOSE objects. Any object that is created, deleted or updated, is done in this database. --- * SET_ derived classes: These are subsets of the _DATABASE object. These subsets are updated by the _EVENTDISPATCHER as the second priority. +-- * SET_ derived classes: These are subsets of the global _DATABASE object (an instance of @{Core.Database#DATABASE}). These subsets are updated by the _EVENTDISPATCHER as the second priority. -- * UNIT objects: UNIT objects can subscribe to DCS events. Each DCS event will be directly published to the subscribed UNIT object. -- * GROUP objects: GROUP objects can subscribe to DCS events. Each DCS event will be directly published to the subscribed GROUP object. -- * Any other object: Various other objects can subscribe to DCS events. Each DCS event triggered will be published to each subscribed object. @@ -52,7 +52,7 @@ -- -- ![Objects](..\Presentations\EVENT\Dia8.JPG) -- --- The actual event subscribing and handling is not facilitated through the _EVENTDISPATCHER, but it is done through the @{BASE} class, @{UNIT} class and @{GROUP} class. +-- The actual event subscribing and handling is not facilitated through the _EVENTDISPATCHER, but it is done through the @{Core.Base#BASE} class, @{Wrapper.Unit#UNIT} class and @{Wrapper.Group#GROUP} class. -- The _EVENTDISPATCHER is a component that is quietly working in the background of MOOSE. -- -- ![Objects](..\Presentations\EVENT\Dia9.JPG) diff --git a/Moose Development/Moose/Core/Fsm.lua b/Moose Development/Moose/Core/Fsm.lua index 89f42e88f..bd70a749a 100644 --- a/Moose Development/Moose/Core/Fsm.lua +++ b/Moose Development/Moose/Core/Fsm.lua @@ -47,9 +47,9 @@ -- and tailored** by mission designers through **the implementation of Transition Handlers**. -- Each of these FSM implementation classes start either with: -- --- * an acronym **AI\_**, which indicates a FSM implementation directing **AI controlled** @{GROUP} and/or @{UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class. +-- * an acronym **AI\_**, which indicates a FSM implementation directing **AI controlled** @{Wrapper.Group#GROUP} and/or @{Wrapper.Unit#UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class. -- * an acronym **TASK\_**, which indicates a FSM implementation executing a @{TASK} executed by Groups of players. These TASK\_ classes derive the @{#FSM_TASK} class. --- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{TASK}, seated in a @{CLIENT} (slot) or a @{UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class. +-- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{TASK}, seated in a @{CLIENT} (slot) or a @{Wrapper.Unit#UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class. -- -- Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections. -- @@ -64,7 +64,7 @@ -- * @{#FSM_TASK}: Models Finite State Machines for @{Task}s. -- * @{#FSM_PROCESS}: Models Finite State Machines for @{Task} actions, which control @{Client}s. -- * @{#FSM_CONTROLLABLE}: Models Finite State Machines for @{Wrapper.Controllable}s, which are @{Wrapper.Group}s, @{Wrapper.Unit}s, @{Client}s. --- * @{#FSM_SET}: Models Finite State Machines for @{Set}s. Note that these FSMs control multiple objects!!! So State concerns here +-- * @{#FSM_SET}: Models Finite State Machines for @{Core.Set}s. Note that these FSMs control multiple objects!!! So State concerns here -- for multiple objects or the position of the state machine in the process. -- -- === @@ -119,9 +119,9 @@ do -- FSM -- and tailored** by mission designers through **the implementation of Transition Handlers**. -- Each of these FSM implementation classes start either with: -- - -- * an acronym **AI\_**, which indicates an FSM implementation directing **AI controlled** @{GROUP} and/or @{UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class. + -- * an acronym **AI\_**, which indicates an FSM implementation directing **AI controlled** @{Wrapper.Group#GROUP} and/or @{Wrapper.Unit#UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class. -- * an acronym **TASK\_**, which indicates an FSM implementation executing a @{TASK} executed by Groups of players. These TASK\_ classes derive the @{#FSM_TASK} class. - -- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{TASK}, seated in a @{CLIENT} (slot) or a @{UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class. + -- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{TASK}, seated in a @{CLIENT} (slot) or a @{Wrapper.Unit#UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class. -- -- ![Transition Rules and Transition Handlers and Event Triggers](..\Presentations\FSM\Dia3.JPG) -- @@ -1382,7 +1382,7 @@ do -- FSM_SET -- @field Core.Set#SET_BASE Set -- @extends Core.Fsm#FSM - --- FSM_SET class models Finite State Machines for @{Set}s. Note that these FSMs control multiple objects!!! So State concerns here + --- FSM_SET class models Finite State Machines for @{Core.Set}s. Note that these FSMs control multiple objects!!! So State concerns here -- for multiple objects or the position of the state machine in the process. -- -- === diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 17b4798a0..2f2d56ce1 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1624,7 +1624,7 @@ do -- SET_GROUP return false end - --- Iterate the SET_GROUP and return true if at least one @{#UNIT} of one @{GROUP} of the @{SET_GROUP} is in @{Core.Zone} + --- Iterate the SET_GROUP and return true if at least one @{#UNIT} of one @{Wrapper.Group#GROUP} of the @{#SET_GROUP} is in @{Core.Zone} -- @param #SET_GROUP self -- @param Core.Zone#ZONE ZoneObject The Zone to be tested for. -- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completely inside the @{Core.Zone#ZONE}, false otherwise. @@ -1649,8 +1649,8 @@ do -- SET_GROUP return false end - --- Iterate the SET_GROUP and return true if at least one @{GROUP} of the @{SET_GROUP} is partly in @{Core.Zone}. - -- Will return false if a @{GROUP} is fully in the @{Core.Zone} + --- Iterate the SET_GROUP and return true if at least one @{Wrapper.Group#GROUP} of the @{#SET_GROUP} is partly in @{Core.Zone}. + -- Will return false if a @{Wrapper.Group#GROUP} is fully in the @{Core.Zone} -- @param #SET_GROUP self -- @param Core.Zone#ZONE ZoneObject The Zone to be tested for. -- @return #boolean true if at least one of the @{Wrapper.Group#GROUP} is partly or completely inside the @{Core.Zone#ZONE}, false otherwise. @@ -1683,7 +1683,7 @@ do -- SET_GROUP end end - --- Iterate the SET_GROUP and return true if no @{GROUP} of the @{SET_GROUP} is in @{Core.Zone} + --- Iterate the SET_GROUP and return true if no @{Wrapper.Group#GROUP} of the @{#SET_GROUP} is in @{Core.Zone} -- This could also be achieved with `not SET_GROUP:AnyPartlyInZone(Zone)`, but it's easier for the -- mission designer to add a dedicated method -- @param #SET_GROUP self @@ -2574,7 +2574,7 @@ do -- SET_UNIT return UnitTypes end - --- Returns a comma separated string of the unit types with a count in the @{Set}. + --- Returns a comma separated string of the unit types with a count in the @{Core.Set}. -- @param #SET_UNIT self -- @return #string The unit types string function SET_UNIT:GetUnitTypesText() @@ -2746,7 +2746,7 @@ do -- SET_UNIT end - --- Returns if the @{Set} has targets having a radar (of a given type). + --- Returns if the @{Core.Set} has targets having a radar (of a given type). -- @param #SET_UNIT self -- @param DCS#Unit.RadarType RadarType -- @return #number The amount of radars in the Set with the given type @@ -2771,7 +2771,7 @@ do -- SET_UNIT return RadarCount end - --- Returns if the @{Set} has targets that can be SEADed. + --- Returns if the @{Core.Set} has targets that can be SEADed. -- @param #SET_UNIT self -- @return #number The amount of SEADable units in the Set function SET_UNIT:HasSEAD() @@ -2795,7 +2795,7 @@ do -- SET_UNIT return SEADCount end - --- Returns if the @{Set} has ground targets. + --- Returns if the @{Core.Set} has ground targets. -- @param #SET_UNIT self -- @return #number The amount of ground targets in the Set. function SET_UNIT:HasGroundUnits() @@ -2812,7 +2812,7 @@ do -- SET_UNIT return GroundUnitCount end - --- Returns if the @{Set} has air targets. + --- Returns if the @{Core.Set} has air targets. -- @param #SET_UNIT self -- @return #number The amount of air targets in the Set. function SET_UNIT:HasAirUnits() @@ -2829,7 +2829,7 @@ do -- SET_UNIT return AirUnitCount end - --- Returns if the @{Set} has friendly ground units. + --- Returns if the @{Core.Set} has friendly ground units. -- @param #SET_UNIT self -- @return #number The amount of ground targets in the Set. function SET_UNIT:HasFriendlyUnits( FriendlyCoalition ) @@ -3514,7 +3514,7 @@ do -- SET_STATIC return StaticTypes end - --- Returns a comma separated string of the unit types with a count in the @{Set}. + --- Returns a comma separated string of the unit types with a count in the @{Core.Set}. -- @param #SET_STATIC self -- @return #string The unit types string function SET_STATIC:GetStaticTypesText() diff --git a/Moose Development/Moose/Core/Spawn.lua b/Moose Development/Moose/Core/Spawn.lua index f34ea74ae..f6aec9e52 100644 --- a/Moose Development/Moose/Core/Spawn.lua +++ b/Moose Development/Moose/Core/Spawn.lua @@ -206,7 +206,7 @@ -- * @{#SPAWN.SpawnAtAirbase}(): Spawn a new group at an @{Wrapper.Airbase}, which can be an airdrome, ship or helipad. -- -- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{Wrapper.Group#GROUP.New} object, that contains a reference to the DCSGroup object. --- You can use the @{GROUP} object to do further actions with the DCSGroup. +-- You can use the @{Wrapper.Group#GROUP} object to do further actions with the DCSGroup. -- -- ### **Scheduled** spawning methods -- @@ -765,7 +765,7 @@ end --- Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius. -- @param #SPAWN self --- @param #boolean RandomizeUnits If true, SPAWN will perform the randomization of the @{UNIT}s position within the group between a given outer and inner radius. +-- @param #boolean RandomizeUnits If true, SPAWN will perform the randomization of the @{Wrapper.Unit#UNIT}s position within the group between a given outer and inner radius. -- @param DCS#Distance OuterRadius (optional) The outer radius in meters where the new group will be spawned. -- @param DCS#Distance InnerRadius (optional) The inner radius in meters where the new group will NOT be spawned. -- @return #SPAWN @@ -1159,7 +1159,7 @@ do -- Delay methods end -- Delay methods --- Will spawn a group based on the internal index. --- Note: Uses @{DATABASE} module defined in MOOSE. +-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE. -- @param #SPAWN self -- @return Wrapper.Group#GROUP The group that was spawned. You can use this group for further actions. function SPAWN:Spawn() @@ -1174,7 +1174,7 @@ function SPAWN:Spawn() end --- Will re-spawn a group based on a given index. --- Note: Uses @{DATABASE} module defined in MOOSE. +-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE. -- @param #SPAWN self -- @param #string SpawnIndex The index of the group to be spawned. -- @return Wrapper.Group#GROUP The group that was spawned. You can use this group for further actions. @@ -1222,7 +1222,7 @@ function SPAWN:SetSpawnIndex( SpawnIndex ) end --- Will spawn a group with a specified index number. --- Uses @{DATABASE} global object defined in MOOSE. +-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE. -- @param #SPAWN self -- @param #string SpawnIndex The index of the group to be spawned. -- @return Wrapper.Group#GROUP The group that was spawned. You can use this group for further actions. @@ -2937,7 +2937,7 @@ function SPAWN:_GetGroupCountryID( SpawnPrefix ) end --- Gets the Group Template from the ME environment definition. --- This method used the @{DATABASE} object, which contains ALL initial and new spawned object in MOOSE. +-- Note: This method uses the global _DATABASE object (an instance of @{Core.Database#DATABASE}), which contains ALL initial and new spawned objects in MOOSE. -- @param #SPAWN self -- @param #string SpawnTemplatePrefix -- @return @SPAWN self diff --git a/Moose Development/Moose/Functional/Designate.lua b/Moose Development/Moose/Functional/Designate.lua index f40693f2e..7bc0c7a82 100644 --- a/Moose Development/Moose/Functional/Designate.lua +++ b/Moose Development/Moose/Functional/Designate.lua @@ -48,7 +48,7 @@ -- -- ![Banner Image](..\Presentations\DESIGNATE\Dia3.JPG) -- --- A typical mission setup would require Recce (a @{Set} of Recce) to be detecting potential targets. +-- A typical mission setup would require Recce (a @{Core.Set} of Recce) to be detecting potential targets. -- The DetectionObject will group the detected targets based on the detection method being used. -- Possible detection methods could be by Area, by Type or by Unit. -- Each grouping will result in a **TargetGroup**, for terminology and clarity we will use this term throughout the document. @@ -276,7 +276,7 @@ do -- DESIGNATE -- # 7. Designate Menu Location for a Mission -- -- You can make DESIGNATE work for a @{Tasking.Mission#MISSION} object. In this way, the designate menu will not appear in the root of the radio menu, but in the menu of the Mission. - -- Use the method @{#DESIGNATE.SetMission}() to set the @{Mission} object for the designate function. + -- Use the method @{#DESIGNATE.SetMission}() to set the @{Tasking.Mission} object for the designate function. -- -- # 8. Status Report -- diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index c65a053eb..dfafcae01 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -40,7 +40,7 @@ do -- DETECTION_BASE --- @type DETECTION_BASE - -- @field Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Forward Air Controller role. + -- @field Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role. -- @field DCS#Distance DetectionRange The range till which targets are accepted to be detected. -- @field #DETECTION_BASE.DetectedObjects DetectedObjects The list of detected objects. -- @field #table DetectedObjectsIdentified Map of the DetectedObjects identified. @@ -318,7 +318,7 @@ do -- DETECTION_BASE --- DETECTION constructor. -- @param #DETECTION_BASE self - -- @param Core.Set#SET_GROUP DetectionSet The @{Set} of @{Group}s that is used to detect the units. + -- @param Core.Set#SET_GROUP DetectionSet The @{Core.Set} of @{Wrapper.Group}s that is used to detect the units. -- @return #DETECTION_BASE self function DETECTION_BASE:New( DetectionSet ) @@ -1982,7 +1982,7 @@ do -- DETECTION_UNITS --- Will detect units within the battle zone. -- - -- It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a @{Core.Set#SET_UNIT} containing ONE @{UNIT} object reference. + -- It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a @{Core.Set#SET_UNIT} containing ONE @{Wrapper.Unit#UNIT} object reference. -- Beware that when the amount of units detected is large, the DetectedItems list will be large also. -- -- @field #DETECTION_UNITS @@ -1993,7 +1993,7 @@ do -- DETECTION_UNITS --- DETECTION_UNITS constructor. -- @param Functional.Detection#DETECTION_UNITS self - -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Forward Air Controller role. + -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role. -- @return Functional.Detection#DETECTION_UNITS self function DETECTION_UNITS:New( DetectionSetGroup ) @@ -2237,7 +2237,7 @@ do -- DETECTION_TYPES --- Will detect units within the battle zone. -- It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. - -- Each DetectedItem will contain a field Set, which contains a @{Core.Set#SET_UNIT} containing ONE @{UNIT} object reference. + -- Each DetectedItem will contain a field Set, which contains a @{Core.Set#SET_UNIT} containing ONE @{Wrapper.Unit#UNIT} object reference. -- Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also. -- -- @field #DETECTION_TYPES @@ -2248,7 +2248,7 @@ do -- DETECTION_TYPES --- DETECTION_TYPES constructor. -- @param Functional.Detection#DETECTION_TYPES self - -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Recce role. + -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Recce role. -- @return Functional.Detection#DETECTION_TYPES self function DETECTION_TYPES:New( DetectionSetGroup ) @@ -2477,7 +2477,7 @@ do -- DETECTION_AREAS --- DETECTION_AREAS constructor. -- @param #DETECTION_AREAS self - -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Forward Air Controller role. + -- @param Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role. -- @param DCS#Distance DetectionZoneRange The range till which targets are grouped upon the first detected target. -- @return #DETECTION_AREAS function DETECTION_AREAS:New( DetectionSetGroup, DetectionZoneRange ) @@ -2498,7 +2498,7 @@ do -- DETECTION_AREAS --- Retrieve set of detected zones. -- @param #DETECTION_AREAS self - -- @return Core.Set#SET_ZONE The @{Set} of ZONE_UNIT objects detected. + -- @return Core.Set#SET_ZONE The @{Core.Set} of ZONE_UNIT objects detected. function DETECTION_AREAS:GetDetectionZones() local zoneset = SET_ZONE:New() for _ID,_Item in pairs (self.DetectedItems) do diff --git a/Moose Development/Moose/Functional/DetectionZones.lua b/Moose Development/Moose/Functional/DetectionZones.lua index 1ed11dafa..8cb9b9d10 100644 --- a/Moose Development/Moose/Functional/DetectionZones.lua +++ b/Moose Development/Moose/Functional/DetectionZones.lua @@ -48,7 +48,7 @@ do -- DETECTION_ZONES --- DETECTION_ZONES constructor. -- @param #DETECTION_ZONES self - -- @param Core.Set#SET_ZONE DetectionSetZone The @{Set} of ZONE_RADIUS. + -- @param Core.Set#SET_ZONE DetectionSetZone The @{Core.Set} of ZONE_RADIUS. -- @param DCS#Coalition.side DetectionCoalition The coalition of the detection. -- @return #DETECTION_ZONES function DETECTION_ZONES:New( DetectionSetZone, DetectionCoalition ) diff --git a/Moose Development/Moose/Functional/MissileTrainer.lua b/Moose Development/Moose/Functional/MissileTrainer.lua index 865beef80..24f2046bc 100644 --- a/Moose Development/Moose/Functional/MissileTrainer.lua +++ b/Moose Development/Moose/Functional/MissileTrainer.lua @@ -28,14 +28,14 @@ -- * **Messages Off**: Disable all messages. -- * **Tracking**: Menu to configure missile tracking messages. -- * **To All**: Shows missile tracking messages to all players. --- * **To Target**: Shows missile tracking messages only to the player where the missile is targetted at. +-- * **To Target**: Shows missile tracking messages only to the player where the missile is targeted at. -- * **Tracking On**: Show missile tracking messages. -- * **Tracking Off**: Disable missile tracking messages. -- * **Frequency Increase**: Increases the missile tracking message frequency with one second. -- * **Frequency Decrease**: Decreases the missile tracking message frequency with one second. -- * **Alerts**: Menu to configure alert messages. -- * **To All**: Shows alert messages to all players. --- * **To Target**: Shows alert messages only to the player where the missile is (was) targetted at. +-- * **To Target**: Shows alert messages only to the player where the missile is (was) targeted at. -- * **Hits On**: Show missile hit alert messages. -- * **Hits Off**: Disable missile hit alert messages. -- * **Launches On**: Show missile launch messages. @@ -88,7 +88,7 @@ -- A MISSILETRAINER object will behave differently based on the usage of initialization methods: -- -- * @{#MISSILETRAINER.InitMessagesOnOff}: Sets by default the display of any message to be ON or OFF. --- * @{#MISSILETRAINER.InitTrackingToAll}: Sets by default the missile tracking report for all players or only for those missiles targetted to you. +-- * @{#MISSILETRAINER.InitTrackingToAll}: Sets by default the missile tracking report for all players or only for those missiles targeted to you. -- * @{#MISSILETRAINER.InitTrackingOnOff}: Sets by default the display of missile tracking report to be ON or OFF. -- * @{#MISSILETRAINER.InitTrackingFrequency}: Increases, decreases the missile tracking message display frequency with the provided time interval in seconds. -- * @{#MISSILETRAINER.InitAlertsToAll}: Sets by default the display of alerts to be shown to all players or only to you. @@ -256,7 +256,7 @@ function MISSILETRAINER:InitMessagesOnOff( MessagesOnOff ) return self end ---- Sets by default the missile tracking report for all players or only for those missiles targetted to you. +--- Sets by default the missile tracking report for all players or only for those missiles targeted to you. -- @param #MISSILETRAINER self -- @param #boolean TrackingToAll true or false -- @return #MISSILETRAINER self diff --git a/Moose Development/Moose/Functional/Movement.lua b/Moose Development/Moose/Functional/Movement.lua index 4b922ed1b..bcb8bb9c1 100644 --- a/Moose Development/Moose/Functional/Movement.lua +++ b/Moose Development/Moose/Functional/Movement.lua @@ -30,23 +30,23 @@ MOVEMENT = { function MOVEMENT:New( MovePrefixes, MoveMaximum ) local self = BASE:Inherit( self, BASE:New() ) -- #MOVEMENT self:F( { MovePrefixes, MoveMaximum } ) - + if type( MovePrefixes ) == 'table' then self.MovePrefixes = MovePrefixes else self.MovePrefixes = { MovePrefixes } end - self.MoveCount = 0 -- The internal counter of the amount of Moveing the has happened since MoveStart. - self.MoveMaximum = MoveMaximum -- Contains the Maximum amount of units that are allowed to move... - self.AliveUnits = 0 -- Contains the counter how many units are currently alive - self.MoveUnits = {} -- Reflects if the Moving for this MovePrefixes is going to be scheduled or not. - + self.MoveCount = 0 -- The internal counter of the amount of Moving the has happened since MoveStart. + self.MoveMaximum = MoveMaximum -- Contains the Maximum amount of units that are allowed to move. + self.AliveUnits = 0 -- Contains the counter how many units are currently alive. + self.MoveUnits = {} -- Reflects if the Moving for this MovePrefixes is going to be scheduled or not. + self:HandleEvent( EVENTS.Birth ) - + -- self:AddEvent( world.event.S_EVENT_BIRTH, self.OnBirth ) -- -- self:EnableEvents() - + self:ScheduleStart() return self @@ -67,7 +67,7 @@ function MOVEMENT:ScheduleStop() end --- Captures the birth events when new Units were spawned. --- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. +-- @todo This method should become obsolete. The global _DATABASE object (an instance of @{Core.Database#DATABASE}) will handle the collection administration. -- @param #MOVEMENT self -- @param Core.Event#EVENTDATA self function MOVEMENT:OnEventBirth( EventData ) @@ -86,14 +86,14 @@ function MOVEMENT:OnEventBirth( EventData ) end end end - + EventData.IniUnit:HandleEvent( EVENTS.DEAD, self.OnDeadOrCrash ) end end --- Captures the Dead or Crash events when Units crash or are destroyed. --- @todo This method should become obsolete. The new @{DATABASE} class will handle the collection administration. +-- @todo This method should become obsolete. The global _DATABASE object (an instance of @{Core.Database#DATABASE}) will handle the collection administration. function MOVEMENT:OnDeadOrCrash( Event ) self:F( { Event } ) diff --git a/Moose Development/Moose/Functional/Range.lua b/Moose Development/Moose/Functional/Range.lua index 244ada259..1826185b3 100644 --- a/Moose Development/Moose/Functional/Range.lua +++ b/Moose Development/Moose/Functional/Range.lua @@ -301,7 +301,7 @@ -- BASE:TraceLevel(1) -- BASE:TraceClass("RANGE") -- --- To get even more output you can increase the trace level to 2 or even 3, c.f. @{BASE} for more details. +-- To get even more output you can increase the trace level to 2 or even 3, c.f. @{Core.Base#BASE} for more details. -- -- The function @{#RANGE.DebugON}() can be used to send messages on screen. It also smokes all defined strafe and bombing targets, the strafe pit approach boxes and the range zone. -- diff --git a/Moose Development/Moose/Globals.lua b/Moose Development/Moose/Globals.lua index d1040822f..4762a10fb 100644 --- a/Moose Development/Moose/Globals.lua +++ b/Moose Development/Moose/Globals.lua @@ -22,37 +22,37 @@ _DATABASE:_RegisterAirbases() --- Check if os etc is available. BASE:I("Checking de-sanitization of os, io and lfs:") -local __na=false +local __na = false if os then BASE:I("- os available") else BASE:I("- os NOT available! Some functions may not work.") - __na=true + __na = true end if io then BASE:I("- io available") else BASE:I("- io NOT available! Some functions may not work.") - __na=true + __na = true end if lfs then BASE:I("- lfs available") else BASE:I("- lfs NOT available! Some functions may not work.") - __na=true + __na = true end if __na then BASE:I("Check /Scripts/MissionScripting.lua and comment out the lines with sanitizeModule(''). Use at your own risk!)") end -BASE.ServerName="Unknown" +BASE.ServerName = "Unknown" if lfs and loadfile then - local serverfile=lfs.writedir() .. 'Config/serverSettings.lua' + local serverfile = lfs.writedir() .. 'Config/serverSettings.lua' if UTILS.FileExists(serverfile) then loadfile(serverfile)() if cfg and cfg.name then - BASE.ServerName=cfg.name + BASE.ServerName = cfg.name end end - BASE.ServerName=BASE.ServerName or "Unknown" - BASE:I("Server Name: "..tostring(BASE.ServerName)) + BASE.ServerName = BASE.ServerName or "Unknown" + BASE:I("Server Name: " .. tostring(BASE.ServerName)) end diff --git a/Moose Development/Moose/Tasking/DetectionManager.lua b/Moose Development/Moose/Tasking/DetectionManager.lua index 3e16fad29..6005a9ffa 100644 --- a/Moose Development/Moose/Tasking/DetectionManager.lua +++ b/Moose Development/Moose/Tasking/DetectionManager.lua @@ -342,7 +342,7 @@ do -- DETECTION_REPORTING return self end - --- Creates a string of the detected items in a @{Detection}. + --- Creates a string of the detected items in a @{Functional.Detection} object. -- @param #DETECTION_MANAGER self -- @param Core.Set#SET_UNIT DetectedSet The detected Set created by the @{Functional.Detection#DETECTION_BASE} object. -- @return #DETECTION_MANAGER self diff --git a/Moose Development/Moose/Tasking/Mission.lua b/Moose Development/Moose/Tasking/Mission.lua index 828a7934f..f44d38a85 100644 --- a/Moose Development/Moose/Tasking/Mission.lua +++ b/Moose Development/Moose/Tasking/Mission.lua @@ -543,7 +543,7 @@ end do -- Group Assignment - --- Returns if the @{Mission} is assigned to the Group. + --- Returns if the @{Tasking.Mission} is assigned to the Group. -- @param #MISSION self -- @param Wrapper.Group#GROUP MissionGroup -- @return #boolean @@ -561,7 +561,7 @@ do -- Group Assignment end - --- Set @{Wrapper.Group} assigned to the @{Mission}. + --- Set @{Wrapper.Group} assigned to the @{Tasking.Mission}. -- @param #MISSION self -- @param Wrapper.Group#GROUP MissionGroup -- @return #MISSION @@ -576,7 +576,7 @@ do -- Group Assignment return self end - --- Clear the @{Wrapper.Group} assignment from the @{Mission}. + --- Clear the @{Wrapper.Group} assignment from the @{Tasking.Mission}. -- @param #MISSION self -- @param Wrapper.Group#GROUP MissionGroup -- @return #MISSION @@ -667,7 +667,7 @@ end --- Get the TASK identified by the TaskNumber from the Mission. This function is useful in GoalFunctions. --- @param #string TaskName The Name of the @{Task} within the @{Mission}. +-- @param #string TaskName The Name of the @{Task} within the @{Tasking.Mission}. -- @return Tasking.Task#TASK The Task -- @return #nil Returns nil if no task was found. function MISSION:GetTask( TaskName ) @@ -677,7 +677,7 @@ function MISSION:GetTask( TaskName ) end ---- Return the next @{Task} ID to be completed within the @{Mission}. +--- Return the next @{Task} ID to be completed within the @{Tasking.Mission}. -- @param #MISSION self -- @param Tasking.Task#TASK Task is the @{Task} object. -- @return Tasking.Task#TASK The task added. @@ -689,7 +689,7 @@ function MISSION:GetNextTaskID( Task ) end ---- Register a @{Task} to be completed within the @{Mission}. +--- Register a @{Task} to be completed within the @{Tasking.Mission}. -- Note that there can be multiple @{Task}s registered to be completed. -- Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached. -- @param #MISSION self @@ -708,7 +708,7 @@ function MISSION:AddTask( Task ) end ---- Removes a @{Task} to be completed within the @{Mission}. +--- Removes a @{Task} to be completed within the @{Tasking.Mission}. -- Note that there can be multiple @{Task}s registered to be completed. -- Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached. -- @param #MISSION self @@ -733,35 +733,35 @@ function MISSION:RemoveTask( Task ) return nil end ---- Is the @{Mission} **COMPLETED**. +--- Is the @{Tasking.Mission} **COMPLETED**. -- @param #MISSION self -- @return #boolean function MISSION:IsCOMPLETED() return self:Is( "COMPLETED" ) end ---- Is the @{Mission} **IDLE**. +--- Is the @{Tasking.Mission} **IDLE**. -- @param #MISSION self -- @return #boolean function MISSION:IsIDLE() return self:Is( "IDLE" ) end ---- Is the @{Mission} **ENGAGED**. +--- Is the @{Tasking.Mission} **ENGAGED**. -- @param #MISSION self -- @return #boolean function MISSION:IsENGAGED() return self:Is( "ENGAGED" ) end ---- Is the @{Mission} **FAILED**. +--- Is the @{Tasking.Mission} **FAILED**. -- @param #MISSION self -- @return #boolean function MISSION:IsFAILED() return self:Is( "FAILED" ) end ---- Is the @{Mission} **HOLD**. +--- Is the @{Tasking.Mission} **HOLD**. -- @param #MISSION self -- @return #boolean function MISSION:IsHOLD() diff --git a/Moose Development/Moose/Tasking/Task_A2A.lua b/Moose Development/Moose/Tasking/Task_A2A.lua index 389be7dd7..b9af14ef2 100644 --- a/Moose Development/Moose/Tasking/Task_A2A.lua +++ b/Moose Development/Moose/Tasking/Task_A2A.lua @@ -18,7 +18,7 @@ do -- TASK_A2A -- @field Core.Set#SET_UNIT TargetSetUnit -- @extends Tasking.Task#TASK - --- Defines Air To Air tasks for a @{Set} of Target Units, + --- Defines Air To Air tasks for a @{Core.Set} of Target Units, -- based on the tasking capabilities defined in @{Tasking.Task#TASK}. -- The TASK_A2A is implemented using a @{Core.Fsm#FSM_TASK}, and has the following statuses: -- diff --git a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua index 12f0446a7..355b9ee00 100644 --- a/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua +++ b/Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua @@ -29,7 +29,7 @@ do -- TASK_A2A_DISPATCHER -- @type TASK_A2A_DISPATCHER -- @extends Tasking.DetectionManager#DETECTION_MANAGER - --- Orchestrates the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups. + --- Orchestrates the dynamic dispatching of tasks upon groups of detected units determined a @{Core.Set} of EWR installation groups. -- -- ![Banner Image](..\Presentations\TASK_A2A_DISPATCHER\Dia3.JPG) -- diff --git a/Moose Development/Moose/Tasking/Task_A2G.lua b/Moose Development/Moose/Tasking/Task_A2G.lua index 20e5df555..d6c8dd613 100644 --- a/Moose Development/Moose/Tasking/Task_A2G.lua +++ b/Moose Development/Moose/Tasking/Task_A2G.lua @@ -18,7 +18,7 @@ do -- TASK_A2G -- @field Core.Set#SET_UNIT TargetSetUnit -- @extends Tasking.Task#TASK - --- The TASK_A2G class defines Air To Ground tasks for a @{Set} of Target Units, + --- The TASK_A2G class defines Air To Ground tasks for a @{Core.Set} of Target Units, -- based on the tasking capabilities defined in @{Tasking.Task#TASK}. -- The TASK_A2G is implemented using a @{Core.Fsm#FSM_TASK}, and has the following statuses: -- diff --git a/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua b/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua index 483801521..5e6038249 100644 --- a/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua +++ b/Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua @@ -32,17 +32,17 @@ do -- TASK_A2G_DISPATCHER -- @field Tasking.Mission#MISSION Mission -- @extends Tasking.DetectionManager#DETECTION_MANAGER - --- Orchestrates dynamic **A2G Task Dispatching** based on the detection results of a linked @{Detection} object. + --- Orchestrates dynamic **A2G Task Dispatching** based on the detection results of a linked @{Functional.Detection} object. -- -- It uses the Tasking System within the MOOSE framework, which is a multi-player Tasking Orchestration system. -- It provides a truly dynamic battle environment for pilots and ground commanders to engage upon, -- in a true co-operation environment wherein **Multiple Teams** will collaborate in Missions to **achieve a common Mission Goal**. -- - -- The A2G dispatcher will dispatch the A2G Tasks to a defined @{Set} of @{Wrapper.Group}s that will be manned by **Players**. - -- We call this the **AttackSet** of the A2G dispatcher. So, the Players are seated in the @{Client}s of the @{Wrapper.Group} @{Set}. + -- The A2G dispatcher will dispatch the A2G Tasks to a defined @{Core.Set} of @{Wrapper.Group}s that will be manned by **Players**. + -- We call this the **AttackSet** of the A2G dispatcher. So, the Players are seated in the @{Client}s of the @{Wrapper.Group} @{Core.Set}. -- -- Depending on the actions of the enemy, preventive tasks are dispatched to the players to orchestrate the engagement in a true co-operation. - -- The detection object will group the detected targets by its grouping method, and integrates a @{Set} of @{Wrapper.Group}s that are Recce vehicles or air units. + -- The detection object will group the detected targets by its grouping method, and integrates a @{Core.Set} of @{Wrapper.Group}s that are Recce vehicles or air units. -- We call this the **RecceSet** of the A2G dispatcher. -- -- Depending on the current detected tactical situation, different task types will be dispatched to the Players seated in the AttackSet.. @@ -108,7 +108,7 @@ do -- TASK_A2G_DISPATCHER -- -- # 1. Player Experience -- - -- The A2G dispatcher is residing under a @{CommandCenter}, which is orchestrating a @{Mission}. + -- The A2G dispatcher is residing under a @{Tasking.CommandCenter}, which is orchestrating a @{Tasking.Mission}. -- As a result, you'll find for DCS World missions that implement the A2G dispatcher a **Command Center Menu** and under this one or more **Mission Menus**. -- -- For example, if there are 2 Command Centers (CC). @@ -384,12 +384,12 @@ do -- TASK_A2G_DISPATCHER -- -- To use the TASK\_A2G\_DISPATCHER class, you need: -- - -- - A @{CommandCenter} object. The master communication channel. - -- - A @{Mission} object. Each task belongs to a Mission. - -- - A @{Detection} object. There are several detection grouping methods to choose from. - -- - A @{Task_A2G_Dispatcher} object. The master A2G task dispatcher. - -- - A @{Set} of @{Wrapper.Group} objects that will detect the enemy, the RecceSet. This is attached to the @{Detection} object. - -- - A @{Set} ob @{Wrapper.Group} objects that will attack the enemy, the AttackSet. This is attached to the @{Task_A2G_Dispatcher} object. + -- - A @{Tasking.CommandCenter} object. The master communication channel. + -- - A @{Tasking.Mission} object. Each task belongs to a Mission. + -- - A @{Functional.Detection} object. There are several detection grouping methods to choose from. + -- - A @{Tasking.Task_A2G_Dispatcher} object. The master A2G task dispatcher. + -- - A @{Core.Set} of @{Wrapper.Group} objects that will detect the enemy, the RecceSet. This is attached to the @{Functional.Detection} object. + -- - A @{Core.Set} of @{Wrapper.Group} objects that will attack the enemy, the AttackSet. This is attached to the @{Tasking.Task_A2G_Dispatcher} object. -- -- Below an example mission declaration that is defines a Task A2G Dispatcher object. -- diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index e8481670a..5fcc50b4b 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -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). -- diff --git a/Moose Development/Moose/Wrapper/Client.lua b/Moose Development/Moose/Wrapper/Client.lua index bc5e6b4f8..12f2baa13 100644 --- a/Moose Development/Moose/Wrapper/Client.lua +++ b/Moose Development/Moose/Wrapper/Client.lua @@ -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).** -- diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index ca31d5d8a..749e9d3ad 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -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 -- @@ -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() @@ -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. diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index d866deeb5..a40edbb76 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -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. diff --git a/Moose Development/Moose/Wrapper/Static.lua b/Moose Development/Moose/Wrapper/Static.lua index 74f5a2839..933052517 100644 --- a/Moose Development/Moose/Wrapper/Static.lua +++ b/Moose Development/Moose/Wrapper/Static.lua @@ -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). -- diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index 645c6e84f..826f4b160 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -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.