Skip to content

Commit a4f41e7

Browse files
tenplus1SmallJoker
authored andcommittedAug 30, 2018
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 {}
1 parent 1c4c0d4 commit a4f41e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎builtin/game/item.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function core.get_node_drops(node, toolname)
197197
return {nodename}
198198
elseif type(drop) == "string" then
199199
-- itemstring drop
200-
return {drop}
200+
return drop ~= "" and {drop} or {}
201201
elseif drop.items == nil then
202202
-- drop = {} to disable default drop
203203
return {}

0 commit comments

Comments
 (0)
Please sign in to comment.