mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge pull request #363 from FlightControl-Master/master-bugfix--#97
Fix of bug #97 **1) Fixed GROUP:IsAlive()** Returns if the Group is alive. The Group must: * Exist at run-time. * Has at least one unit. When the first @{Unit} of the Group is active, it will return true. If the first @{Unit} of the Group is inactive, it will return false. @param #GROUP self @return #boolean true if the Group is alive and active. @return #boolean false if the Group is alive but inactive. @return #nil if the group does not exist anymore. **2) Fixed IDENTIFIABLEIsAlive()** Returns if the Identifiable is alive. If the Identifiable is not alive, nil is returned. If the Identifiable is alive, true is returned. @param #IDENTIFIABLE self @return #boolean true if Identifiable is alive. @return #nil if the Identifiable is not existing or is not alive. **3) Fixed UNIT:IsAlive()** Returns if the Unit is alive. If the Unit is not alive, nil is returned. If the Unit is alive and active, true is returned. If the Unit is alive but not active, false is returned. @param #UNIT self @return #boolean true if Unit is alive and active. @return #boolean false if Unit is alive but not active. @return #nil if the Unit is not existing or is not alive. **4) Updated all test missions, as this is a core change.**
This commit is contained in:
commit
80a5b54980
@ -1,4 +1,6 @@
|
|||||||
--- This module contains the GROUP class.
|
--- **Wrapper** -- GROUP is a wrapper class for the DCS Class Group.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
||||||
--
|
--
|
||||||
@ -55,8 +57,6 @@
|
|||||||
---
|
---
|
||||||
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
||||||
--
|
--
|
||||||
-- ## GROUP reference methods
|
|
||||||
--
|
|
||||||
-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -183,19 +183,33 @@ function GROUP:GetPositionVec3() -- Overridden from POSITIONABLE:GetPositionVec3
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the DCS Group is alive.
|
--- Returns if the Group is alive.
|
||||||
-- When the group exists at run-time, this method will return true, otherwise false.
|
-- The Group must:
|
||||||
|
--
|
||||||
|
-- * Exist at run-time.
|
||||||
|
-- * Has at least one unit.
|
||||||
|
--
|
||||||
|
-- When the first @{Unit} of the Group is active, it will return true.
|
||||||
|
-- If the first @{Unit} of the Group is inactive, it will return false.
|
||||||
|
--
|
||||||
-- @param #GROUP self
|
-- @param #GROUP self
|
||||||
-- @return #boolean true if the DCS Group is alive.
|
-- @return #boolean true if the Group is alive and active.
|
||||||
|
-- @return #boolean false if the Group is alive but inactive.
|
||||||
|
-- @return #nil if the group does not exist anymore.
|
||||||
function GROUP:IsAlive()
|
function GROUP:IsAlive()
|
||||||
self:F2( self.GroupName )
|
self:F2( self.GroupName )
|
||||||
|
|
||||||
local DCSGroup = self:GetDCSObject()
|
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||||
|
|
||||||
if DCSGroup then
|
if DCSGroup then
|
||||||
local GroupIsAlive = DCSGroup:isExist() and DCSGroup:getUnit(1) ~= nil
|
if DCSGroup:isExist() then
|
||||||
self:T3( GroupIsAlive )
|
local DCSUnit = DCSGroup:getUnit(1) -- Dcs.DCSUnit#Unit
|
||||||
return GroupIsAlive
|
if DCSUnit then
|
||||||
|
local GroupIsAlive = DCSUnit:isActive()
|
||||||
|
self:T3( GroupIsAlive )
|
||||||
|
return GroupIsAlive
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -58,17 +58,19 @@ function IDENTIFIABLE:New( IdentifiableName )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the Identifiable is alive.
|
--- Returns if the Identifiable is alive.
|
||||||
|
-- If the Identifiable is not alive, nil is returned.
|
||||||
|
-- If the Identifiable is alive, true is returned.
|
||||||
-- @param #IDENTIFIABLE self
|
-- @param #IDENTIFIABLE self
|
||||||
-- @return #boolean true if Identifiable is alive.
|
-- @return #boolean true if Identifiable is alive.
|
||||||
-- @return #nil The DCS Identifiable is not existing or alive.
|
-- @return #nil if the Identifiable is not existing or is not alive.
|
||||||
function IDENTIFIABLE:IsAlive()
|
function IDENTIFIABLE:IsAlive()
|
||||||
self:F3( self.IdentifiableName )
|
self:F3( self.IdentifiableName )
|
||||||
|
|
||||||
local DCSIdentifiable = self:GetDCSObject()
|
local DCSIdentifiable = self:GetDCSObject() -- Dcs.DCSObject#Object
|
||||||
|
|
||||||
if DCSIdentifiable then
|
if DCSIdentifiable then
|
||||||
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
||||||
return IdentifiableIsAlive
|
return IdentifiableIsAlive
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
--- This module contains the UNIT class.
|
--- **Wrapper** - UNIT is a wrapper class for the DCS Class Unit.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- 1) @{#UNIT} class, extends @{Controllable#CONTROLLABLE}
|
|
||||||
-- ===========================================================
|
|
||||||
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
||||||
--
|
--
|
||||||
-- * Support all DCS Unit APIs.
|
-- * Support all DCS Unit APIs.
|
||||||
@ -9,9 +9,14 @@
|
|||||||
-- * Handle local Unit Controller.
|
-- * Handle local Unit Controller.
|
||||||
-- * Manage the "state" of the DCS Unit.
|
-- * Manage the "state" of the DCS Unit.
|
||||||
--
|
--
|
||||||
--
|
-- @module Unit
|
||||||
-- 1.1) UNIT reference methods
|
|
||||||
-- ----------------------
|
--- @type UNIT
|
||||||
|
-- @extends Wrapper.Controllable#CONTROLLABLE
|
||||||
|
|
||||||
|
---
|
||||||
|
-- # UNIT class, extends @{Controllable#CONTROLLABLE}
|
||||||
|
--
|
||||||
-- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -29,15 +34,15 @@
|
|||||||
--
|
--
|
||||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||||
--
|
--
|
||||||
-- 1.2) DCS UNIT APIs
|
-- ## DCS UNIT APIs
|
||||||
-- ------------------
|
--
|
||||||
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
||||||
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
||||||
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
||||||
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
||||||
--
|
--
|
||||||
-- 1.3) Smoke, Flare Units
|
-- ## Smoke, Flare Units
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class provides methods to smoke or flare units easily.
|
-- The UNIT class provides methods to smoke or flare units easily.
|
||||||
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
||||||
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
||||||
@ -45,36 +50,29 @@
|
|||||||
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
||||||
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
||||||
--
|
--
|
||||||
-- 1.4) Location Position, Point
|
-- ## Location Position, Point
|
||||||
-- -----------------------------
|
--
|
||||||
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
||||||
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
||||||
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
||||||
--
|
--
|
||||||
-- 1.5) Test if alive
|
-- ## Test if alive
|
||||||
-- ------------------
|
--
|
||||||
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
||||||
--
|
--
|
||||||
-- 1.6) Test for proximity
|
-- ## Test for proximity
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
||||||
--
|
--
|
||||||
-- ### 1.6.1) Zones
|
-- ### Zones
|
||||||
|
--
|
||||||
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
||||||
--
|
--
|
||||||
-- ### 1.6.2) Units
|
-- ### Units
|
||||||
|
--
|
||||||
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
||||||
--
|
--
|
||||||
-- @module Unit
|
-- @field #UNIT UNIT
|
||||||
-- @author FlightControl
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- The UNIT class
|
|
||||||
-- @type UNIT
|
|
||||||
-- @extends Wrapper.Controllable#CONTROLLABLE
|
|
||||||
UNIT = {
|
UNIT = {
|
||||||
ClassName="UNIT",
|
ClassName="UNIT",
|
||||||
}
|
}
|
||||||
@ -216,7 +214,7 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Remove obscolete units from the group structure
|
-- Remove obscolete units from the group structure
|
||||||
i = 1
|
local i = 1
|
||||||
while i <= #SpawnGroupTemplate.units do
|
while i <= #SpawnGroupTemplate.units do
|
||||||
|
|
||||||
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
||||||
@ -252,6 +250,27 @@ function UNIT:IsActive()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Returns if the Unit is alive.
|
||||||
|
-- If the Unit is not alive, nil is returned.
|
||||||
|
-- If the Unit is alive and active, true is returned.
|
||||||
|
-- If the Unit is alive but not active, false is returned.
|
||||||
|
-- @param #UNIT self
|
||||||
|
-- @return #boolean true if Unit is alive and active.
|
||||||
|
-- @return #boolean false if Unit is alive but not active.
|
||||||
|
-- @return #nil if the Unit is not existing or is not alive.
|
||||||
|
function UNIT:IsAlive()
|
||||||
|
self:F3( self.UnitName )
|
||||||
|
|
||||||
|
local DCSUnit = self:GetDCSObject() -- Dcs.DCSUnit#Unit
|
||||||
|
|
||||||
|
if DCSUnit then
|
||||||
|
local UnitIsAlive = DCSUnit:isExist() and DCSUnit:isActive()
|
||||||
|
return UnitIsAlive
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Returns the Unit's callsign - the localized string.
|
--- Returns the Unit's callsign - the localized string.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170326_0853' )
|
env.info( 'Moose Generation Timestamp: 20170327_1033' )
|
||||||
local base = _G
|
local base = _G
|
||||||
|
|
||||||
Include = {}
|
Include = {}
|
||||||
@ -13241,17 +13241,19 @@ function IDENTIFIABLE:New( IdentifiableName )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the Identifiable is alive.
|
--- Returns if the Identifiable is alive.
|
||||||
|
-- If the Identifiable is not alive, nil is returned.
|
||||||
|
-- If the Identifiable is alive, true is returned.
|
||||||
-- @param #IDENTIFIABLE self
|
-- @param #IDENTIFIABLE self
|
||||||
-- @return #boolean true if Identifiable is alive.
|
-- @return #boolean true if Identifiable is alive.
|
||||||
-- @return #nil The DCS Identifiable is not existing or alive.
|
-- @return #nil if the Identifiable is not existing or is not alive.
|
||||||
function IDENTIFIABLE:IsAlive()
|
function IDENTIFIABLE:IsAlive()
|
||||||
self:F3( self.IdentifiableName )
|
self:F3( self.IdentifiableName )
|
||||||
|
|
||||||
local DCSIdentifiable = self:GetDCSObject()
|
local DCSIdentifiable = self:GetDCSObject() -- Dcs.DCSObject#Object
|
||||||
|
|
||||||
if DCSIdentifiable then
|
if DCSIdentifiable then
|
||||||
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
||||||
return IdentifiableIsAlive
|
return IdentifiableIsAlive
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -16070,7 +16072,9 @@ function CONTROLLABLE:WayPointExecute( WayPoint, WaitTime )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Message APIs--- This module contains the GROUP class.
|
-- Message APIs--- **Wrapper** -- GROUP is a wrapper class for the DCS Class Group.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
||||||
--
|
--
|
||||||
@ -16127,8 +16131,6 @@ end
|
|||||||
---
|
---
|
||||||
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
||||||
--
|
--
|
||||||
-- ## GROUP reference methods
|
|
||||||
--
|
|
||||||
-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -16255,19 +16257,33 @@ function GROUP:GetPositionVec3() -- Overridden from POSITIONABLE:GetPositionVec3
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the DCS Group is alive.
|
--- Returns if the Group is alive.
|
||||||
-- When the group exists at run-time, this method will return true, otherwise false.
|
-- The Group must:
|
||||||
|
--
|
||||||
|
-- * Exist at run-time.
|
||||||
|
-- * Has at least one unit.
|
||||||
|
--
|
||||||
|
-- When the first @{Unit} of the Group is active, it will return true.
|
||||||
|
-- If the first @{Unit} of the Group is inactive, it will return false.
|
||||||
|
--
|
||||||
-- @param #GROUP self
|
-- @param #GROUP self
|
||||||
-- @return #boolean true if the DCS Group is alive.
|
-- @return #boolean true if the Group is alive and active.
|
||||||
|
-- @return #boolean false if the Group is alive but inactive.
|
||||||
|
-- @return #nil if the group does not exist anymore.
|
||||||
function GROUP:IsAlive()
|
function GROUP:IsAlive()
|
||||||
self:F2( self.GroupName )
|
self:F2( self.GroupName )
|
||||||
|
|
||||||
local DCSGroup = self:GetDCSObject()
|
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||||
|
|
||||||
if DCSGroup then
|
if DCSGroup then
|
||||||
local GroupIsAlive = DCSGroup:isExist() and DCSGroup:getUnit(1) ~= nil
|
if DCSGroup:isExist() then
|
||||||
self:T3( GroupIsAlive )
|
local DCSUnit = DCSGroup:getUnit(1) -- Dcs.DCSUnit#Unit
|
||||||
return GroupIsAlive
|
if DCSUnit then
|
||||||
|
local GroupIsAlive = DCSUnit:isActive()
|
||||||
|
self:T3( GroupIsAlive )
|
||||||
|
return GroupIsAlive
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -17099,10 +17115,10 @@ do -- Players
|
|||||||
return PlayerNames
|
return PlayerNames
|
||||||
end
|
end
|
||||||
|
|
||||||
end--- This module contains the UNIT class.
|
end--- **Wrapper** - UNIT is a wrapper class for the DCS Class Unit.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- 1) @{#UNIT} class, extends @{Controllable#CONTROLLABLE}
|
|
||||||
-- ===========================================================
|
|
||||||
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
||||||
--
|
--
|
||||||
-- * Support all DCS Unit APIs.
|
-- * Support all DCS Unit APIs.
|
||||||
@ -17110,9 +17126,14 @@ end--- This module contains the UNIT class.
|
|||||||
-- * Handle local Unit Controller.
|
-- * Handle local Unit Controller.
|
||||||
-- * Manage the "state" of the DCS Unit.
|
-- * Manage the "state" of the DCS Unit.
|
||||||
--
|
--
|
||||||
--
|
-- @module Unit
|
||||||
-- 1.1) UNIT reference methods
|
|
||||||
-- ----------------------
|
--- @type UNIT
|
||||||
|
-- @extends Wrapper.Controllable#CONTROLLABLE
|
||||||
|
|
||||||
|
---
|
||||||
|
-- # UNIT class, extends @{Controllable#CONTROLLABLE}
|
||||||
|
--
|
||||||
-- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -17130,15 +17151,15 @@ end--- This module contains the UNIT class.
|
|||||||
--
|
--
|
||||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||||
--
|
--
|
||||||
-- 1.2) DCS UNIT APIs
|
-- ## DCS UNIT APIs
|
||||||
-- ------------------
|
--
|
||||||
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
||||||
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
||||||
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
||||||
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
||||||
--
|
--
|
||||||
-- 1.3) Smoke, Flare Units
|
-- ## Smoke, Flare Units
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class provides methods to smoke or flare units easily.
|
-- The UNIT class provides methods to smoke or flare units easily.
|
||||||
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
||||||
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
||||||
@ -17146,36 +17167,29 @@ end--- This module contains the UNIT class.
|
|||||||
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
||||||
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
||||||
--
|
--
|
||||||
-- 1.4) Location Position, Point
|
-- ## Location Position, Point
|
||||||
-- -----------------------------
|
--
|
||||||
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
||||||
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
||||||
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
||||||
--
|
--
|
||||||
-- 1.5) Test if alive
|
-- ## Test if alive
|
||||||
-- ------------------
|
--
|
||||||
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
||||||
--
|
--
|
||||||
-- 1.6) Test for proximity
|
-- ## Test for proximity
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
||||||
--
|
--
|
||||||
-- ### 1.6.1) Zones
|
-- ### Zones
|
||||||
|
--
|
||||||
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
||||||
--
|
--
|
||||||
-- ### 1.6.2) Units
|
-- ### Units
|
||||||
|
--
|
||||||
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
||||||
--
|
--
|
||||||
-- @module Unit
|
-- @field #UNIT UNIT
|
||||||
-- @author FlightControl
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- The UNIT class
|
|
||||||
-- @type UNIT
|
|
||||||
-- @extends Wrapper.Controllable#CONTROLLABLE
|
|
||||||
UNIT = {
|
UNIT = {
|
||||||
ClassName="UNIT",
|
ClassName="UNIT",
|
||||||
}
|
}
|
||||||
@ -17317,7 +17331,7 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Remove obscolete units from the group structure
|
-- Remove obscolete units from the group structure
|
||||||
i = 1
|
local i = 1
|
||||||
while i <= #SpawnGroupTemplate.units do
|
while i <= #SpawnGroupTemplate.units do
|
||||||
|
|
||||||
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
||||||
@ -17353,6 +17367,27 @@ function UNIT:IsActive()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Returns if the Unit is alive.
|
||||||
|
-- If the Unit is not alive, nil is returned.
|
||||||
|
-- If the Unit is alive and active, true is returned.
|
||||||
|
-- If the Unit is alive but not active, false is returned.
|
||||||
|
-- @param #UNIT self
|
||||||
|
-- @return #boolean true if Unit is alive and active.
|
||||||
|
-- @return #boolean false if Unit is alive but not active.
|
||||||
|
-- @return #nil if the Unit is not existing or is not alive.
|
||||||
|
function UNIT:IsAlive()
|
||||||
|
self:F3( self.UnitName )
|
||||||
|
|
||||||
|
local DCSUnit = self:GetDCSObject() -- Dcs.DCSUnit#Unit
|
||||||
|
|
||||||
|
if DCSUnit then
|
||||||
|
local UnitIsAlive = DCSUnit:isExist() and DCSUnit:isActive()
|
||||||
|
return UnitIsAlive
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Returns the Unit's callsign - the localized string.
|
--- Returns the Unit's callsign - the localized string.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170326_0853' )
|
env.info( 'Moose Generation Timestamp: 20170327_1033' )
|
||||||
local base = _G
|
local base = _G
|
||||||
|
|
||||||
Include = {}
|
Include = {}
|
||||||
@ -13241,17 +13241,19 @@ function IDENTIFIABLE:New( IdentifiableName )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the Identifiable is alive.
|
--- Returns if the Identifiable is alive.
|
||||||
|
-- If the Identifiable is not alive, nil is returned.
|
||||||
|
-- If the Identifiable is alive, true is returned.
|
||||||
-- @param #IDENTIFIABLE self
|
-- @param #IDENTIFIABLE self
|
||||||
-- @return #boolean true if Identifiable is alive.
|
-- @return #boolean true if Identifiable is alive.
|
||||||
-- @return #nil The DCS Identifiable is not existing or alive.
|
-- @return #nil if the Identifiable is not existing or is not alive.
|
||||||
function IDENTIFIABLE:IsAlive()
|
function IDENTIFIABLE:IsAlive()
|
||||||
self:F3( self.IdentifiableName )
|
self:F3( self.IdentifiableName )
|
||||||
|
|
||||||
local DCSIdentifiable = self:GetDCSObject()
|
local DCSIdentifiable = self:GetDCSObject() -- Dcs.DCSObject#Object
|
||||||
|
|
||||||
if DCSIdentifiable then
|
if DCSIdentifiable then
|
||||||
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
local IdentifiableIsAlive = DCSIdentifiable:isExist()
|
||||||
return IdentifiableIsAlive
|
return IdentifiableIsAlive
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -16070,7 +16072,9 @@ function CONTROLLABLE:WayPointExecute( WayPoint, WaitTime )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Message APIs--- This module contains the GROUP class.
|
-- Message APIs--- **Wrapper** -- GROUP is a wrapper class for the DCS Class Group.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
-- The @{#GROUP} class is a wrapper class to handle the DCS Group objects:
|
||||||
--
|
--
|
||||||
@ -16127,8 +16131,6 @@ end
|
|||||||
---
|
---
|
||||||
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
-- # GROUP class, extends @{Controllable#CONTROLLABLE}
|
||||||
--
|
--
|
||||||
-- ## GROUP reference methods
|
|
||||||
--
|
|
||||||
-- For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -16255,19 +16257,33 @@ function GROUP:GetPositionVec3() -- Overridden from POSITIONABLE:GetPositionVec3
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Returns if the DCS Group is alive.
|
--- Returns if the Group is alive.
|
||||||
-- When the group exists at run-time, this method will return true, otherwise false.
|
-- The Group must:
|
||||||
|
--
|
||||||
|
-- * Exist at run-time.
|
||||||
|
-- * Has at least one unit.
|
||||||
|
--
|
||||||
|
-- When the first @{Unit} of the Group is active, it will return true.
|
||||||
|
-- If the first @{Unit} of the Group is inactive, it will return false.
|
||||||
|
--
|
||||||
-- @param #GROUP self
|
-- @param #GROUP self
|
||||||
-- @return #boolean true if the DCS Group is alive.
|
-- @return #boolean true if the Group is alive and active.
|
||||||
|
-- @return #boolean false if the Group is alive but inactive.
|
||||||
|
-- @return #nil if the group does not exist anymore.
|
||||||
function GROUP:IsAlive()
|
function GROUP:IsAlive()
|
||||||
self:F2( self.GroupName )
|
self:F2( self.GroupName )
|
||||||
|
|
||||||
local DCSGroup = self:GetDCSObject()
|
local DCSGroup = self:GetDCSObject() -- Dcs.DCSGroup#Group
|
||||||
|
|
||||||
if DCSGroup then
|
if DCSGroup then
|
||||||
local GroupIsAlive = DCSGroup:isExist() and DCSGroup:getUnit(1) ~= nil
|
if DCSGroup:isExist() then
|
||||||
self:T3( GroupIsAlive )
|
local DCSUnit = DCSGroup:getUnit(1) -- Dcs.DCSUnit#Unit
|
||||||
return GroupIsAlive
|
if DCSUnit then
|
||||||
|
local GroupIsAlive = DCSUnit:isActive()
|
||||||
|
self:T3( GroupIsAlive )
|
||||||
|
return GroupIsAlive
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -17099,10 +17115,10 @@ do -- Players
|
|||||||
return PlayerNames
|
return PlayerNames
|
||||||
end
|
end
|
||||||
|
|
||||||
end--- This module contains the UNIT class.
|
end--- **Wrapper** - UNIT is a wrapper class for the DCS Class Unit.
|
||||||
|
--
|
||||||
|
-- ===
|
||||||
--
|
--
|
||||||
-- 1) @{#UNIT} class, extends @{Controllable#CONTROLLABLE}
|
|
||||||
-- ===========================================================
|
|
||||||
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
-- The @{#UNIT} class is a wrapper class to handle the DCS Unit objects:
|
||||||
--
|
--
|
||||||
-- * Support all DCS Unit APIs.
|
-- * Support all DCS Unit APIs.
|
||||||
@ -17110,9 +17126,14 @@ end--- This module contains the UNIT class.
|
|||||||
-- * Handle local Unit Controller.
|
-- * Handle local Unit Controller.
|
||||||
-- * Manage the "state" of the DCS Unit.
|
-- * Manage the "state" of the DCS Unit.
|
||||||
--
|
--
|
||||||
--
|
-- @module Unit
|
||||||
-- 1.1) UNIT reference methods
|
|
||||||
-- ----------------------
|
--- @type UNIT
|
||||||
|
-- @extends Wrapper.Controllable#CONTROLLABLE
|
||||||
|
|
||||||
|
---
|
||||||
|
-- # UNIT class, extends @{Controllable#CONTROLLABLE}
|
||||||
|
--
|
||||||
-- For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _@{DATABASE} object.
|
-- 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).
|
-- 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).
|
||||||
--
|
--
|
||||||
@ -17130,15 +17151,15 @@ end--- This module contains the UNIT class.
|
|||||||
--
|
--
|
||||||
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
-- IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).
|
||||||
--
|
--
|
||||||
-- 1.2) DCS UNIT APIs
|
-- ## DCS UNIT APIs
|
||||||
-- ------------------
|
--
|
||||||
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
-- The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method.
|
||||||
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
-- To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call,
|
||||||
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
-- the first letter of the method is also capitalized. So, by example, the DCS Unit method @{DCSWrapper.Unit#Unit.getName}()
|
||||||
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
-- is implemented in the UNIT class as @{#UNIT.GetName}().
|
||||||
--
|
--
|
||||||
-- 1.3) Smoke, Flare Units
|
-- ## Smoke, Flare Units
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class provides methods to smoke or flare units easily.
|
-- The UNIT class provides methods to smoke or flare units easily.
|
||||||
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
-- The @{#UNIT.SmokeBlue}(), @{#UNIT.SmokeGreen}(),@{#UNIT.SmokeOrange}(), @{#UNIT.SmokeRed}(), @{#UNIT.SmokeRed}() methods
|
||||||
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
-- will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit.
|
||||||
@ -17146,36 +17167,29 @@ end--- This module contains the UNIT class.
|
|||||||
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
-- The @{#UNIT.FlareGreen}(), @{#UNIT.FlareRed}(), @{#UNIT.FlareWhite}(), @{#UNIT.FlareYellow}()
|
||||||
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
-- methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.
|
||||||
--
|
--
|
||||||
-- 1.4) Location Position, Point
|
-- ## Location Position, Point
|
||||||
-- -----------------------------
|
--
|
||||||
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
-- The UNIT class provides methods to obtain the current point or position of the DCS Unit.
|
||||||
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
-- The @{#UNIT.GetPointVec2}(), @{#UNIT.GetVec3}() will obtain the current **location** of the DCS Unit in a Vec2 (2D) or a **point** in a Vec3 (3D) vector respectively.
|
||||||
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
-- If you want to obtain the complete **3D position** including ori<72>ntation and direction vectors, consult the @{#UNIT.GetPositionVec3}() method respectively.
|
||||||
--
|
--
|
||||||
-- 1.5) Test if alive
|
-- ## Test if alive
|
||||||
-- ------------------
|
--
|
||||||
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
-- The @{#UNIT.IsAlive}(), @{#UNIT.IsActive}() methods determines if the DCS Unit is alive, meaning, it is existing and active.
|
||||||
--
|
--
|
||||||
-- 1.6) Test for proximity
|
-- ## Test for proximity
|
||||||
-- -----------------------
|
--
|
||||||
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
-- The UNIT class contains methods to test the location or proximity against zones or other objects.
|
||||||
--
|
--
|
||||||
-- ### 1.6.1) Zones
|
-- ### Zones
|
||||||
|
--
|
||||||
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
|
||||||
--
|
--
|
||||||
-- ### 1.6.2) Units
|
-- ### Units
|
||||||
|
--
|
||||||
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
|
||||||
--
|
--
|
||||||
-- @module Unit
|
-- @field #UNIT UNIT
|
||||||
-- @author FlightControl
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- The UNIT class
|
|
||||||
-- @type UNIT
|
|
||||||
-- @extends Wrapper.Controllable#CONTROLLABLE
|
|
||||||
UNIT = {
|
UNIT = {
|
||||||
ClassName="UNIT",
|
ClassName="UNIT",
|
||||||
}
|
}
|
||||||
@ -17317,7 +17331,7 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Remove obscolete units from the group structure
|
-- Remove obscolete units from the group structure
|
||||||
i = 1
|
local i = 1
|
||||||
while i <= #SpawnGroupTemplate.units do
|
while i <= #SpawnGroupTemplate.units do
|
||||||
|
|
||||||
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
local UnitTemplateData = SpawnGroupTemplate.units[i]
|
||||||
@ -17353,6 +17367,27 @@ function UNIT:IsActive()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Returns if the Unit is alive.
|
||||||
|
-- If the Unit is not alive, nil is returned.
|
||||||
|
-- If the Unit is alive and active, true is returned.
|
||||||
|
-- If the Unit is alive but not active, false is returned.
|
||||||
|
-- @param #UNIT self
|
||||||
|
-- @return #boolean true if Unit is alive and active.
|
||||||
|
-- @return #boolean false if Unit is alive but not active.
|
||||||
|
-- @return #nil if the Unit is not existing or is not alive.
|
||||||
|
function UNIT:IsAlive()
|
||||||
|
self:F3( self.UnitName )
|
||||||
|
|
||||||
|
local DCSUnit = self:GetDCSObject() -- Dcs.DCSUnit#Unit
|
||||||
|
|
||||||
|
if DCSUnit then
|
||||||
|
local UnitIsAlive = DCSUnit:isExist() and DCSUnit:isActive()
|
||||||
|
return UnitIsAlive
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Returns the Unit's callsign - the localized string.
|
--- Returns the Unit's callsign - the localized string.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user