mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
CHIEF
**CHIEF** v0.5.0 - Added `CHIEF:AddTransportToResource` function **OPSZONE** - Added `Undraw` option **UTILS** - Added `UTILS.EnsureTable` function
This commit is contained in:
@@ -2001,6 +2001,22 @@ function UTILS.GenerateLaserCodes()
|
||||
return jtacGeneratedLaserCodes
|
||||
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
|
||||
-- @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.
|
||||
|
||||
Reference in New Issue
Block a user