Skip to content

Commit

Permalink
get_node_drops: Make empty drop return empty table (#7592)
Browse files Browse the repository at this point in the history
This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {}
  • Loading branch information
tenplus1 authored and SmallJoker committed Aug 30, 2018
1 parent 1c4c0d4 commit a4f41e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/game/item.lua
Expand Up @@ -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 {}
Expand Down

0 comments on commit a4f41e7

Please sign in to comment.