Skip to content
Snippets Groups Projects
Commit eeb09002 authored by Ilya Zhuravlev's avatar Ilya Zhuravlev
Browse files

Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s).

parent 804a7875
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,10 @@ function minetest.get_node_drops(nodename, toolname)
local drop = ItemStack({name=nodename}):get_definition().drop
if drop == nil then
-- default drop
return {ItemStack({name=nodename})}
return {nodename}
elseif type(drop) == "string" then
-- itemstring drop
return {ItemStack(drop)}
return {drop}
elseif drop.items == nil then
-- drop = {} to disable default drop
return {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment