Fix minetest.get_node_drops(). It should always return list of item names, not ItemSt...
authorIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 2 Dec 2012 16:19:06 +0000 (20:19 +0400)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 2 Dec 2012 17:09:30 +0000 (21:09 +0400)
builtin/item.lua

index 4be77e1d758171aa85a56088e259339eb4eb6549..80c665c99b34a9999f7e2e6a8303b8366219d512 100644 (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 {}