Refactoring

This commit is contained in:
Frank
2020-05-16 12:58:59 +02:00
parent 5afd5cae27
commit 9b72254ccc
5 changed files with 496 additions and 323 deletions
@@ -602,6 +602,26 @@ function POSITIONABLE:IsGround()
end
--- Returns if the unit is of ship category.
-- @param #POSITIONABLE self
-- @return #boolean Ship category evaluation result.
function POSITIONABLE:IsShip()
self:F2()
local DCSUnit = self:GetDCSObject()
if DCSUnit then
local UnitDescriptor = DCSUnit:getDesc()
local IsShip = ( UnitDescriptor.category == Unit.Category.SHIP )
return IsShip
end
return nil
end
--- Returns true if the POSITIONABLE is in the air.
-- Polymorphic, is overridden in GROUP and UNIT.
-- @param Wrapper.Positionable#POSITIONABLE self