From eb26f112a3c83da1eb79284f2f3621d1b90bba6c Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sun, 2 Sep 2012 18:40:20 +0200 Subject: [PATCH] Add some comments for a future version of Minetest --- init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 48c268b..1e8c3ae 100644 --- a/init.lua +++ b/init.lua @@ -62,11 +62,12 @@ minetest.register_globalstep(function(dtime) end end) - +-- TODO this can be removed in future version function minetest.get_node_drops(nodename, toolname) return {} end +-- TODO this can be removed in future version function minetest.get_drops(nodename, toolname) local drop = ItemStack({name=nodename}):get_definition().drop if drop == nil then @@ -116,6 +117,13 @@ function minetest.get_drops(nodename, toolname) return got_items end +-- TODO this code will work in a future version of Minetest +--[[ +function minetest.handle_node_drops(pos, drops, digger) + return +end +]] + minetest.register_on_dignode(function(pos, oldnode, digger) local drop = minetest.get_drops(oldnode.name, digger:get_wielded_item():get_name()) if drop == nil then