This commit is contained in:
Applevangelist
2024-07-15 17:23:45 +02:00
parent 703589d8e4
commit b890dc22a3
2 changed files with 28 additions and 11 deletions

View File

@@ -112,19 +112,28 @@ end
-- * Object.Category.SCENERY = 5
-- * Object.Category.Cargo = 6
--
-- For UNITs this returns a second value, one of
--
-- Unit.Category.AIRPLANE = 0
-- Unit.Category.HELICOPTER = 1
-- Unit.Category.GROUND_UNIT = 2
-- Unit.Category.SHIP = 3
-- Unit.Category.STRUCTURE = 4
--
-- @param #IDENTIFIABLE self
-- @return DCS#Object.Category The category ID, i.e. a number.
-- @return DCS#Unit.Category The unit category ID, i.e. a number. For units only.
function IDENTIFIABLE:GetCategory()
self:F2( self.ObjectName )
local DCSObject = self:GetDCSObject()
if DCSObject then
local ObjectCategory = DCSObject:getCategory()
local ObjectCategory, UnitCategory = DCSObject:getCategory()
self:T3( ObjectCategory )
return ObjectCategory
return ObjectCategory, UnitCategory
end
return nil
return nil,nil
end