v0.4.0 - Aaaand event.lua is no longer working. FUUUUUUUUU
This commit is contained in:
@@ -4,4 +4,19 @@ function table.find(table, item)
|
||||
return(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function table.copy(orig)
|
||||
local orig_type = type(orig)
|
||||
local copy
|
||||
if orig_type == 'table' then
|
||||
copy = {}
|
||||
for orig_key, orig_value in next, orig, nil do
|
||||
copy[table.copy(orig_key)] = table.copy(orig_value)
|
||||
end
|
||||
setmetatable(copy, table.copy(getmetatable(orig)))
|
||||
else -- number, string, boolean, etc
|
||||
copy = orig
|
||||
end
|
||||
return copy
|
||||
end
|
||||
Reference in New Issue
Block a user