mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 23:58:48 -05:00
Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s).
This commit is contained in:
parent
804a7875a2
commit
eeb0900291
@ -76,10 +76,10 @@ function minetest.get_node_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
|
||||||
-- default drop
|
-- default drop
|
||||||
return {ItemStack({name=nodename})}
|
return {nodename}
|
||||||
elseif type(drop) == "string" then
|
elseif type(drop) == "string" then
|
||||||
-- itemstring drop
|
-- itemstring drop
|
||||||
return {ItemStack(drop)}
|
return {drop}
|
||||||
elseif drop.items == nil then
|
elseif drop.items == nil then
|
||||||
-- drop = {} to disable default drop
|
-- drop = {} to disable default drop
|
||||||
return {}
|
return {}
|
||||||
|
Loading…
Reference in New Issue
Block a user