Merge branch 'master' into develop

This commit is contained in:
Frank 2021-05-28 23:01:15 +02:00
commit 8b6f9f9de7

View File

@ -3824,3 +3824,23 @@ function CONTROLLABLE:OptionDisperseOnAttack(Seconds)
end
return nil
end
--- Returns if the unit is a submarine.
-- @param #POSITIONABLE self
-- @return #boolean Submarines attributes result.
function POSITIONABLE:IsSubmarine()
self:F2()
local DCSUnit = self:GetDCSObject()
if DCSUnit then
local UnitDescriptor = DCSUnit:getDesc()
if UnitDescriptor.attributes["Submarines"] == true then
return true
else
return false
end
end
return nil
end