mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 22:02:26 +01: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
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- TODO this can be removed in future version
|
||||||
function minetest.get_node_drops(nodename, toolname)
|
function minetest.get_node_drops(nodename, toolname)
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO this can be removed in future version
|
||||||
function minetest.get_drops(nodename, toolname)
|
function minetest.get_drops(nodename, toolname)
|
||||||
local drop = ItemStack({name=nodename}):get_definition().drop
|
local drop = ItemStack({name=nodename}):get_definition().drop
|
||||||
if drop == nil then
|
if drop == nil then
|
||||||
@ -116,6 +117,13 @@ function minetest.get_drops(nodename, toolname)
|
|||||||
return got_items
|
return got_items
|
||||||
end
|
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)
|
minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||||
local drop = minetest.get_drops(oldnode.name, digger:get_wielded_item():get_name())
|
local drop = minetest.get_drops(oldnode.name, digger:get_wielded_item():get_name())
|
||||||
if drop == nil then
|
if drop == nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user