forked from mtcontrib/homedecor_modpack
use the minetest provided table copy function
This commit is contained in:
parent
45aef81f55
commit
d2824c10e7
@ -400,7 +400,7 @@ for i in ipairs(gates_list) do
|
||||
minetest.register_node("homedecor:gate_"..gate.."_closed", def)
|
||||
|
||||
-- this is either a terrible idea or a great one
|
||||
def = homedecor.table_copy(def)
|
||||
def = table.copy(def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
def.selection_box.fixed = { 0.4, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
||||
def.node_box.fixed = gate_models_open[i]
|
||||
|
@ -19,19 +19,6 @@ homedecor = {
|
||||
expect_infinite_stacks = minetest.setting_getbool("creative_mode") and not minetest.get_modpath("unified_inventory")
|
||||
}
|
||||
|
||||
--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
|
||||
|
||||
-- Determine if the item being pointed at is the underside of a node (e.g a ceiling)
|
||||
function homedecor.find_ceiling(itemstack, placer, pointed_thing)
|
||||
-- most of this is copied from the rotate-and-place function in builtin
|
||||
|
Loading…
Reference in New Issue
Block a user