mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-21 06:04:49 +00:00
#CONTROLLABLE
- Added OptionAllowFormationSideSwap() - Added OptionAIRunwayLineup()
This commit is contained in:
@@ -1672,6 +1672,9 @@ do -- AI
|
||||
-- @field OPTION_RADIO_USAGE_KILL
|
||||
-- @field JETT_TANKS_IF_EMPTY
|
||||
-- @field FORCED_ATTACK
|
||||
-- @field PREFER_VERTICAL
|
||||
-- @field ALLOW_FORMATION_SIDE_SWAP
|
||||
-- @field AI_RUNWAY_LINE_UP
|
||||
|
||||
---
|
||||
-- @type AI.Option.Air.val
|
||||
|
||||
@@ -5053,7 +5053,6 @@ end
|
||||
|
||||
--- (Internal) Housekeeping - Cleanup crates when build
|
||||
-- @param #CTLD self
|
||||
--
|
||||
-- @param #table Crates Table of #CTLD_CARGO objects near the unit.
|
||||
-- @param #CTLD.Buildable Build Table build object.
|
||||
-- @param #number Number Number of objects in Crates (found) to limit search.
|
||||
|
||||
@@ -3658,6 +3658,46 @@ function CONTROLLABLE:OptionPreferVerticalLanding()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Air - Allow formation side swap
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:OptionAllowFormationSideSwap()
|
||||
self:F2( { self.ControllableName } )
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
|
||||
if self:IsAir() then
|
||||
Controller:setOption( AI.Option.Air.id.ALLOW_FORMATION_SIDE_SWAP, true )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Air - Allow formation takeoff, if enough space
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:OptionAIRunwayLineUp()
|
||||
self:F2( { self.ControllableName } )
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
|
||||
if self:IsAir() then
|
||||
Controller:setOption( 37, true )
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Can the CONTROLLABLE evade on enemy fire?
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #boolean
|
||||
|
||||
Reference in New Issue
Block a user