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
d805352a97
@ -740,8 +740,10 @@ function UTILS.RemoveMark(MarkID, Delay)
|
|||||||
if Delay and Delay>0 then
|
if Delay and Delay>0 then
|
||||||
TIMER:New(UTILS.RemoveMark, MarkID):Start(Delay)
|
TIMER:New(UTILS.RemoveMark, MarkID):Start(Delay)
|
||||||
else
|
else
|
||||||
|
if MarkID then
|
||||||
trigger.action.removeMark(MarkID)
|
trigger.action.removeMark(MarkID)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -2015,6 +2017,22 @@ function UTILS.GenerateLaserCodes()
|
|||||||
return jtacGeneratedLaserCodes
|
return jtacGeneratedLaserCodes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Ensure the passed object is a table.
|
||||||
|
-- @param #table Object The object that should be a table.
|
||||||
|
-- @return #table The object that is a table. Note that if the Object is `#nil` initially, and empty table `{}` is returned.
|
||||||
|
function UTILS.EnsureTable(Object)
|
||||||
|
|
||||||
|
if Object then
|
||||||
|
if type(Object)~="table" then
|
||||||
|
Object={Object}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Object={}
|
||||||
|
end
|
||||||
|
|
||||||
|
return Object
|
||||||
|
end
|
||||||
|
|
||||||
--- Function to save an object to a file
|
--- Function to save an object to a file
|
||||||
-- @param #string Path The path to use. Use double backslashes \\\\ on Windows filesystems.
|
-- @param #string Path The path to use. Use double backslashes \\\\ on Windows filesystems.
|
||||||
-- @param #string Filename The name of the file. Existing file will be overwritten.
|
-- @param #string Filename The name of the file. Existing file will be overwritten.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user