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

master
Ilya Zhuravlev 2012-12-02 20:19:06 +04:00
parent 804a7875a2
commit eeb0900291
1 changed files with 2 additions and 2 deletions

View File

@ -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 {}