3 Commits

Author SHA1 Message Date
45a8064d3d Merge branch 'master' of yunohost.local:mtcontrib/plantlife_modpack into nalc-1.2-dev 2019-12-22 14:34:30 +01:00
Vanessa Dannenberg
31e0066238 oops 2019-06-18 14:59:34 -04:00
Vanessa Dannenberg
3d13053d97 use table copy instead of own clone node 2019-06-18 14:55:29 -04:00

View File

@@ -1,14 +1,5 @@
-- Code by Mossmanikin, Neuromancer, and others -- Code by Mossmanikin, Neuromancer, and others
local function clone_node(name)
local node2 = {}
local node = minetest.registered_nodes[name]
for k,v in pairs(node) do
node2[k]=v
end
return node2
end
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
-- TWiGS -- TWiGS
----------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------
@@ -230,7 +221,7 @@ for i in pairs(TRuNKS) do
if minetest.get_modpath(MoD) ~= nil if minetest.get_modpath(MoD) ~= nil
and NR < 6 -- moretrees trunks allready have facedir and NR < 6 -- moretrees trunks allready have facedir
and minetest.registered_nodes[trunkname] then -- the node being called exists. and minetest.registered_nodes[trunkname] then -- the node being called exists.
temptrunk = clone_node(trunkname) temptrunk = table.copy(minetest.registered_nodes[trunkname])
temptrunk.paramtype2 = "facedir" temptrunk.paramtype2 = "facedir"
minetest.register_node(":"..trunkname, temptrunk) minetest.register_node(":"..trunkname, temptrunk)
end end