diff options
author | tenplus1 <tenplus1@users.noreply.github.com> | 2018-08-30 19:32:33 +0100 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-08-30 20:32:33 +0200 |
commit | a4f41e7bfc6c2d823eab1465258617cb033a452c (patch) | |
tree | b0c26554016969ad7e8d0e4e808acbf1b642cd12 /builtin/game | |
parent | 1c4c0d46738708676e9b85cdd71d6433a05e5d0a (diff) | |
download | minetest-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.lua | 2 |
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 {} |