mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
DCS 2.7
- Added COORDINATE:LineToAll and COORDINATE:CircleToAll - Added altitude parameter to CONTROLLABLE:TaskFireAtPoint - Added emission on/off functions to UNIT
This commit is contained in:
@@ -761,6 +761,41 @@ function UNIT:GetFuel()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
|
||||
-- @param #UNIT self
|
||||
-- @param #boolean Switch If `true` or `nil`, emission is enabled. If `false`, emission is turned off.
|
||||
-- @return #UNIT self
|
||||
function UNIT:SetEmission(Switch)
|
||||
|
||||
if Switch==nil then
|
||||
Switch=true
|
||||
end
|
||||
|
||||
local DCSUnit = self:GetDCSObject()
|
||||
|
||||
if DCSUnit then
|
||||
DCSUnit:enableEmission(Switch)
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets the passed group or unit objects radar emitters ON. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
|
||||
-- @param #UNIT self
|
||||
-- @return #UNIT self
|
||||
function UNIT:EnableEmission()
|
||||
self:SetEmission(true)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Sets the passed group or unit objects radar emitters OFF. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
|
||||
-- @param #UNIT self
|
||||
-- @return #UNIT self
|
||||
function UNIT:DisableEmission()
|
||||
self:SetEmission(false)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Returns a list of one @{Wrapper.Unit}.
|
||||
-- @param #UNIT self
|
||||
-- @return #list<Wrapper.Unit#UNIT> A list of one @{Wrapper.Unit}.
|
||||
|
||||
Reference in New Issue
Block a user