mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Cleanup
This commit is contained in:
@@ -113,9 +113,9 @@ GROUPTEMPLATE.Takeoff = {
|
||||
-- It is merely added to the @{Core.Database}.
|
||||
-- @param #GROUP self
|
||||
-- @param #table GroupTemplate The GroupTemplate Structure exactly as defined within the mission editor.
|
||||
-- @param Dcs.DCScoalition#coalition.side CoalitionSide The coalition.side of the group.
|
||||
-- @param Dcs.DCSGroup#Group.Category CategoryID The Group.Category of the group.
|
||||
-- @param Dcs.DCScountry#country.id CountryID the country.id of the group.
|
||||
-- @param DCS#coalition.side CoalitionSide The coalition.side of the group.
|
||||
-- @param DCS#Group.Category CategoryID The Group.Category of the group.
|
||||
-- @param DCS#country.id CountryID the country.id of the group.
|
||||
-- @return #GROUP self
|
||||
function GROUP:NewTemplate( GroupTemplate, CoalitionSide, CategoryID, CountryID )
|
||||
local GroupName = GroupTemplate.name
|
||||
@@ -149,7 +149,7 @@ end
|
||||
|
||||
--- Find the GROUP wrapper class instance using the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @param Dcs.DCSWrapper.Group#Group DCSGroup The DCS Group.
|
||||
-- @param DCS#Group DCSGroup The DCS Group.
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:Find( DCSGroup )
|
||||
|
||||
@@ -172,7 +172,7 @@ end
|
||||
|
||||
--- Returns the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCSWrapper.Group#Group The DCS Group.
|
||||
-- @return DCS#Group The DCS Group.
|
||||
function GROUP:GetDCSObject()
|
||||
local DCSGroup = Group.getByName( self.GroupName )
|
||||
|
||||
@@ -185,7 +185,7 @@ end
|
||||
|
||||
--- Returns the @{DCSTypes#Position3} position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
-- @return Dcs.DCSTypes#Position The 3D position vectors of the POSITIONABLE.
|
||||
-- @return DCS#Position The 3D position vectors of the POSITIONABLE.
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
function GROUP:GetPositionVec3() -- Overridden from POSITIONABLE:GetPositionVec3()
|
||||
self:F2( self.PositionableName )
|
||||
@@ -217,11 +217,11 @@ end
|
||||
function GROUP:IsAlive()
|
||||
self:F2( self.GroupName )
|
||||
|
||||
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||
local DCSGroup = self:GetDCSObject() -- DCS#Group
|
||||
|
||||
if DCSGroup then
|
||||
if DCSGroup:isExist() then
|
||||
local DCSUnit = DCSGroup:getUnit(1) -- Dcs.DCSUnit#Unit
|
||||
local DCSUnit = DCSGroup:getUnit(1) -- DCS#Unit
|
||||
if DCSUnit then
|
||||
local GroupIsAlive = DCSUnit:isActive()
|
||||
self:T3( GroupIsAlive )
|
||||
@@ -277,7 +277,7 @@ end
|
||||
|
||||
--- Returns category of the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCSWrapper.Group#Group.Category The category ID
|
||||
-- @return DCS#Group.Category The category ID
|
||||
function GROUP:GetCategory()
|
||||
self:F2( self.GroupName )
|
||||
|
||||
@@ -317,7 +317,7 @@ end
|
||||
|
||||
--- Returns the coalition of the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCSCoalitionWrapper.Object#coalition.side The coalition side of the DCS Group.
|
||||
-- @return DCS#coalition.side The coalition side of the DCS Group.
|
||||
function GROUP:GetCoalition()
|
||||
self:F2( self.GroupName )
|
||||
|
||||
@@ -333,7 +333,7 @@ end
|
||||
|
||||
--- Returns the country of the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCScountry#country.id The country identifier.
|
||||
-- @return DCS#country.id The country identifier.
|
||||
-- @return #nil The DCS Group is not existing or alive.
|
||||
function GROUP:GetCountry()
|
||||
self:F2( self.GroupName )
|
||||
@@ -448,7 +448,7 @@ end
|
||||
-- If the underlying DCS Unit does not exist, the method will return nil. .
|
||||
-- @param #GROUP self
|
||||
-- @param #number UnitNumber The number of the DCS Unit to be returned.
|
||||
-- @return Dcs.DCSWrapper.Unit#Unit The DCS Unit.
|
||||
-- @return DCS#Unit The DCS Unit.
|
||||
function GROUP:GetDCSUnit( UnitNumber )
|
||||
self:F3( { self.GroupName, UnitNumber } )
|
||||
|
||||
@@ -488,7 +488,7 @@ end
|
||||
|
||||
--- Returns the average velocity Vec3 vector.
|
||||
-- @param Wrapper.Group#GROUP self
|
||||
-- @return Dcs.DCSTypes#Vec3 The velocity Vec3 vector
|
||||
-- @return DCS#Vec3 The velocity Vec3 vector
|
||||
-- @return #nil The GROUP is not existing or alive.
|
||||
function GROUP:GetVelocityVec3()
|
||||
self:F2( self.GroupName )
|
||||
@@ -524,7 +524,7 @@ end
|
||||
--- Returns the average group height in meters.
|
||||
-- @param Wrapper.Group#GROUP self
|
||||
-- @param #boolean FromGround Measure from the ground or from sea level. Provide **true** for measuring from the ground. **false** or **nil** if you measure from sea level.
|
||||
-- @return Dcs.DCSTypes#Vec3 The height of the group.
|
||||
-- @return DCS#Vec3 The height of the group.
|
||||
-- @return #nil The GROUP is not existing or alive.
|
||||
function GROUP:GetHeight( FromGround )
|
||||
self:F2( self.GroupName )
|
||||
@@ -658,7 +658,7 @@ end
|
||||
|
||||
--- Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCSTypes#Vec2 Current Vec2 point of the first DCS Unit of the DCS Group.
|
||||
-- @return DCS#Vec2 Current Vec2 point of the first DCS Unit of the DCS Group.
|
||||
function GROUP:GetVec2()
|
||||
self:F2( self.GroupName )
|
||||
|
||||
@@ -671,7 +671,7 @@ end
|
||||
|
||||
--- Returns the current Vec3 vector of the first DCS Unit in the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @return Dcs.DCSTypes#Vec3 Current Vec3 of the first DCS Unit of the GROUP.
|
||||
-- @return DCS#Vec3 Current Vec3 of the first DCS Unit of the GROUP.
|
||||
function GROUP:GetVec3()
|
||||
self:F2( self.GroupName )
|
||||
|
||||
@@ -723,10 +723,10 @@ end
|
||||
--- Returns a random @{DCSTypes#Vec3} vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.
|
||||
-- @param #GROUP self
|
||||
-- @param #number Radius
|
||||
-- @return Dcs.DCSTypes#Vec3 The random 3D point vector around the first UNIT of the GROUP.
|
||||
-- @return DCS#Vec3 The random 3D point vector around the first UNIT of the GROUP.
|
||||
-- @return #nil The GROUP is invalid or empty
|
||||
-- @usage
|
||||
-- -- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
|
||||
-- -- If Radius is ignored, returns the DCS#Vec3 of first UNIT of the GROUP
|
||||
function GROUP:GetRandomVec3(Radius)
|
||||
self:F2(self.GroupName)
|
||||
|
||||
@@ -1004,10 +1004,10 @@ do -- AI methods
|
||||
-- @return #GROUP The GROUP.
|
||||
function GROUP:SetAIOnOff( AIOnOff )
|
||||
|
||||
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||
local DCSGroup = self:GetDCSObject() -- DCS#Group
|
||||
|
||||
if DCSGroup then
|
||||
local DCSController = DCSGroup:getController() -- Dcs.DCSController#Controller
|
||||
local DCSController = DCSGroup:getController() -- DCS#Controller
|
||||
if DCSController then
|
||||
DCSController:setOnOff( AIOnOff )
|
||||
return self
|
||||
@@ -1114,7 +1114,7 @@ end
|
||||
|
||||
--- Sets the CountryID of the group in a Template.
|
||||
-- @param #GROUP self
|
||||
-- @param Dcs.DCScountry#country.id CountryID The country ID.
|
||||
-- @param DCS#country.id CountryID The country ID.
|
||||
-- @return #table
|
||||
function GROUP:SetTemplateCountry( Template, CountryID )
|
||||
Template.CountryID = CountryID
|
||||
@@ -1123,7 +1123,7 @@ end
|
||||
|
||||
--- Sets the CoalitionID of the group in a Template.
|
||||
-- @param #GROUP self
|
||||
-- @param Dcs.DCSCoalitionWrapper.Object#coalition.side CoalitionID The coalition ID.
|
||||
-- @param DCS#coalition.side CoalitionID The coalition ID.
|
||||
-- @return #table
|
||||
function GROUP:SetTemplateCoalition( Template, CoalitionID )
|
||||
Template.CoalitionID = CoalitionID
|
||||
|
||||
Reference in New Issue
Block a user