projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c4c0d4
)
get_node_drops: Make empty drop return empty table (#7592)
author
tenplus1
<tenplus1@users.noreply.github.com>
Thu, 30 Aug 2018 18:32:33 +0000
(19:32 +0100)
committer
SmallJoker
<SmallJoker@users.noreply.github.com>
Thu, 30 Aug 2018 18:32:33 +0000
(20:32 +0200)
This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {}
builtin/game/item.lua
patch
|
blob
|
history
diff --git
a/builtin/game/item.lua
b/builtin/game/item.lua
index 591531db0b4b9e145b1dceb67b680ac8809aee54..9b7569c774de1791d37abe62b8d124d633decb3f 100644
(file)
--- 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 {}