1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-08 01:20:23 +02:00

Move table copy function out of signs lib and into init.lua, make it global.

This commit is contained in:
Vanessa Ezekowitz
2013-10-27 22:51:56 -04:00
parent 2ffd00909a
commit b483733540
3 changed files with 21 additions and 15 deletions

View File

@ -29,18 +29,36 @@ else
end
homedecor.gettext = S
-- debug
local dbg = function(s)
if homedecor.debug == 1 then
print('[HomeDecor] ' .. s)
end
end
-- infinite stacks
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
homedecor.expect_infinite_stacks = false
else
homedecor.expect_infinite_stacks = true
end
--table copy
function homedecor.table_copy(t)
local nt = { };
for k, v in pairs(t) do
if type(v) == "table" then
nt[k] = homedecor.table_copy(v)
else
nt[k] = v
end
end
return nt
end
dofile(homedecor.modpath.."/ownership.lua")
dofile(homedecor.modpath.."/lib_6d.lua")