mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-14 13:18:48 +00:00
ops
This commit is contained in:
@@ -90,7 +90,6 @@ end
|
||||
--- Returns the type name of the DCS Identifiable.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #string The type name of the DCS Identifiable.
|
||||
-- @return #nil The DCS Identifiable is not existing or alive.
|
||||
function IDENTIFIABLE:GetTypeName()
|
||||
self:F2( self.IdentifiableName )
|
||||
|
||||
|
||||
@@ -436,6 +436,60 @@ function UNIT:GetRange()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Check if the unit is refuelable. Also retrieves the refuelling system (boom or probe) if applicable.
|
||||
-- @param #UNIT self
|
||||
-- @return #boolean If true, unit is refuelable (checks for the attribute "Refuelable").
|
||||
-- @return #number Refueling system (if any): 0=boom, 1=probe.
|
||||
function UNIT:IsRefuelable()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
local refuelable=self:HasAttribute("Refuelable")
|
||||
|
||||
local system=nil
|
||||
|
||||
local Desc=self:GetDesc().attributes
|
||||
if Desc and Desc.tankerType then
|
||||
system=Desc.tankerType
|
||||
end
|
||||
|
||||
return refuelable, system
|
||||
end
|
||||
|
||||
--- Check if the unit is a tanker. Also retrieves the refuelling system (boom or probe) if applicable.
|
||||
-- @param #UNIT self
|
||||
-- @return #boolean If true, unit is refuelable (checks for the attribute "Refuelable").
|
||||
-- @return #number Refueling system (if any): 0=boom, 1=probe.
|
||||
function UNIT:IsTanker()
|
||||
self:F2( self.UnitName )
|
||||
|
||||
local tanker=self:HasAttribute("Tankers")
|
||||
|
||||
local system=nil
|
||||
|
||||
local Desc=self:GetDesc().attributes
|
||||
if Desc and Desc.tankerType then
|
||||
system=Desc.tankerType
|
||||
end
|
||||
|
||||
local typename=self:GetTypeName()
|
||||
if typename=="IL-78M" then
|
||||
system=1 --probe
|
||||
elseif typename=="KC130" then
|
||||
system=-1 --?
|
||||
elseif typename=="KC135BDA" then
|
||||
system=-1 --?
|
||||
elseif typename=="KC135BDA" then
|
||||
system=-1 --?
|
||||
elseif typename=="KC135MPRS" then
|
||||
system=0 --boom
|
||||
elseif typename=="S-3B Tanker" then
|
||||
system=1 --probe
|
||||
end
|
||||
|
||||
return tanker, system
|
||||
end
|
||||
|
||||
|
||||
--- Returns the unit's group if it exist and nil otherwise.
|
||||
-- @param Wrapper.Unit#UNIT self
|
||||
-- @return Wrapper.Group#GROUP The Group of the Unit.
|
||||
|
||||
Reference in New Issue
Block a user