aboutsummaryrefslogtreecommitdiff
path: root/builtin/game
diff options
context:
space:
mode:
authortenplus1 <tenplus1@users.noreply.github.com>2018-08-30 19:32:33 +0100
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-08-30 20:32:33 +0200
commita4f41e7bfc6c2d823eab1465258617cb033a452c (patch)
treeb0c26554016969ad7e8d0e4e808acbf1b642cd12 /builtin/game
parent1c4c0d46738708676e9b85cdd71d6433a05e5d0a (diff)
downloadminetest-a4f41e7bfc6c2d823eab1465258617cb033a452c.tar.gz
minetest-a4f41e7bfc6c2d823eab1465258617cb033a452c.tar.bz2
minetest-a4f41e7bfc6c2d823eab1465258617cb033a452c.zip
get_node_drops: Make empty drop return empty table (#7592)
This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {}
Diffstat (limited to 'builtin/game')
-rw-r--r--builtin/game/item.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index 591531db0..9b7569c77 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -197,7 +197,7 @@ function core.get_node_drops(node, toolname)
return {nodename}
elseif type(drop) == "string" then
-- itemstring drop
- return {drop}
+ return drop ~= "" and {drop} or {}
elseif drop.items == nil then
-- drop = {} to disable default drop
return {}