Skip to content
Permalink
Browse files

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 {}
  • Loading branch information...
tenplus1 authored and SmallJoker committed Aug 30, 2018
1 parent 1c4c0d4 commit a4f41e7bfc6c2d823eab1465258617cb033a452c
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 {}

0 comments on commit a4f41e7

Please sign in to comment.
You can’t perform that action at this time.