summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 9c36883..0ac4562 100644
--- a/init.lua
+++ b/init.lua
@@ -52,6 +52,17 @@ else
end
moretrees.intllib = S
+-- clone node
+
+function moretrees.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
+
-- infinite stacks checking
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then