cc-mc-server/mc/util.lua

18 lines
329 B
Lua
Raw Normal View History

2024-07-12 16:58:47 +01:00
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