mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
b1002017e5
@ -5639,7 +5639,7 @@ end
|
|||||||
--- [GROUND] Create and enable a new IR Marker for the given controllable UNIT or GROUP.
|
--- [GROUND] Create and enable a new IR Marker for the given controllable UNIT or GROUP.
|
||||||
-- @param #CONTROLLABLE self
|
-- @param #CONTROLLABLE self
|
||||||
-- @param #boolean EnableImmediately (Optionally) If true start up the IR Marker immediately. Else you need to call `myobject:EnableIRMarker()` later on.
|
-- @param #boolean EnableImmediately (Optionally) If true start up the IR Marker immediately. Else you need to call `myobject:EnableIRMarker()` later on.
|
||||||
-- @param #number Runtime (Optionally) Run this IR Marker for the given number of seconds, then stop. Use in conjunction with EnableImmediately.
|
-- @param #number Runtime (Optionally) Run this IR Marker for the given number of seconds, then stop. Use in conjunction with EnableImmediately. Defaults to 60 seconds.
|
||||||
-- @return #CONTROLLABLE self
|
-- @return #CONTROLLABLE self
|
||||||
function CONTROLLABLE:NewIRMarker(EnableImmediately, Runtime)
|
function CONTROLLABLE:NewIRMarker(EnableImmediately, Runtime)
|
||||||
self:T2("NewIRMarker")
|
self:T2("NewIRMarker")
|
||||||
@ -5751,7 +5751,12 @@ end
|
|||||||
-- @return #boolean outcome
|
-- @return #boolean outcome
|
||||||
function CONTROLLABLE:HasIRMarker()
|
function CONTROLLABLE:HasIRMarker()
|
||||||
self:T2("HasIRMarker")
|
self:T2("HasIRMarker")
|
||||||
if self.timer and self.timer:IsRunning() then return true end
|
if self:IsInstanceOf("GROUP") then
|
||||||
|
local units = self:GetUnits() or {}
|
||||||
|
for _,_unit in pairs(units) do
|
||||||
|
if _unit.timer and _unit.timer:IsRunning() then return true end
|
||||||
|
end
|
||||||
|
elseif self.timer and self.timer:IsRunning() then return true end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user