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 {}
This commit is contained in:
tenplus1 2018-08-30 19:32:33 +01:00 committed by Nils Dagsson Moskopp
parent 2d06c7f22c
commit 9d010c2c66
Signed by: erlehmann
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

@ -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 {}