A2A_DISPATCHER
- Docs

CONTROLLABLE
- OptionROEOpenFireWeaponFree()
- Fixed OptionRTBBingoFuel()
This commit is contained in:
Frank
2019-07-05 20:01:26 +02:00
parent 8780ec3687
commit 6f140be710
2 changed files with 85 additions and 20 deletions

View File

@@ -2806,6 +2806,8 @@ function CONTROLLABLE:GetDetectedTargets( DetectVisual, DetectOptical, DetectRad
return nil
end
--- Check if a target is detected.
-- @param Wrapper.Controllable#CONTROLLABLE self
function CONTROLLABLE:IsTargetDetected( DCSObject, DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK )
self:F2( self.ControllableName )
@@ -2851,7 +2853,7 @@ function CONTROLLABLE:OptionROEHoldFirePossible()
return nil
end
--- Holding weapons.
--- Weapons Hold: AI will hold fire under all circumstances.
-- @param Wrapper.Controllable#CONTROLLABLE self
-- @return Wrapper.Controllable#CONTROLLABLE self
function CONTROLLABLE:OptionROEHoldFire()
@@ -2893,7 +2895,7 @@ function CONTROLLABLE:OptionROEReturnFirePossible()
return nil
end
--- Return fire.
--- Return Fire: AI will only engage threats that shoot first.
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionROEReturnFire()
@@ -2935,7 +2937,7 @@ function CONTROLLABLE:OptionROEOpenFirePossible()
return nil
end
--- Openfire.
--- Open Fire (Only Designated): AI will engage only targets specified in its taskings.
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionROEOpenFire()
@@ -2959,6 +2961,45 @@ function CONTROLLABLE:OptionROEOpenFire()
return nil
end
--- Can the CONTROLLABLE attack priority designated targets? Only for AIR!
-- @param #CONTROLLABLE self
-- @return #boolean
function CONTROLLABLE:OptionROEOpenFireWeaponFreePossible()
self:F2( { self.ControllableName } )
local DCSControllable = self:GetDCSObject()
if DCSControllable then
if self:IsAir() then
return true
end
return false
end
return nil
end
--- Open Fire, Weapons Free (Priority Designated): AI will engage any enemy group it detects, but will prioritize targets specified in the groups tasking.
-- **Only for AIR units!**
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionROEOpenFireWeaponFree()
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.ROE, AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE )
end
return self
end
return nil
end
--- Can the CONTROLLABLE attack targets of opportunity?
-- @param #CONTROLLABLE self
-- @return #boolean
@@ -3231,7 +3272,10 @@ end
function CONTROLLABLE:OptionRTBBingoFuel( RTB ) --R2.2
self:F2( { self.ControllableName } )
RTB = RTB or true
--RTB = RTB or true
if RTB==nil then
RTB=true
end
local DCSControllable = self:GetDCSObject()
if DCSControllable then