Skip to content

Commit

Permalink
Merge pull request #1540 from FlightControl-Master/Applevangelist-sub…
Browse files Browse the repository at this point in the history
…marine

Update Controllable.lua
  • Loading branch information
funkyfranky authored May 28, 2021
2 parents 85fef96 + 6e37300 commit 2d7e7d5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Moose Development/Moose/Wrapper/Controllable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3817,10 +3817,30 @@ function CONTROLLABLE:OptionDisperseOnAttack(Seconds)
local Controller = self:_GetController()
if Controller then
if self:IsGround() then
self:SetOption(AI.Option.GROUND.id.DISPERSE_ON_ATTACK, seconds)
self:SetOption(AI.Option.Ground.id.DISPERSE_ON_ATTACK, seconds)
end
end
return self
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

0 comments on commit 2d7e7d5

Please sign in to comment.