mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
8b6f9f9de7
@ -3824,3 +3824,23 @@ function CONTROLLABLE:OptionDisperseOnAttack(Seconds)
|
|||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user