From: Ilya Zhuravlev Date: Sun, 2 Dec 2012 16:19:06 +0000 (+0400) Subject: Fix minetest.get_node_drops(). It should always return list of item names, not ItemSt... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=eeb0900291583c6d81656fbbd977fa74b1a733b6;p=zefram%2Fminetest%2Fminetest_engine.git Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s). --- diff --git a/builtin/item.lua b/builtin/item.lua index 4be77e1d..80c665c9 100644 --- a/builtin/item.lua +++ b/builtin/item.lua @@ -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 {}