mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-08-20 05:04:07 +02:00
Add some comments for a future version of Minetest
This commit is contained in:
parent
b3f79c7cee
commit
eb26f112a3
10
init.lua
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user