cc-mc-server/mc/util.lua
2024-07-12 16:58:47 +01:00

18 lines
No EOL
329 B
Lua

local util = {}
function util.deepCopyTable(originalTable)
if originalTable == nil then return nil end
local tableCopy = {}
for key, value in pairs(originalTable) do
if type(value) == "table" then
tableCopy[key] = util.deepCopyTable(value)
else
tableCopy[key] = value
end
end
return tableCopy
end
return util