projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
804a787
)
Fix minetest.get_node_drops(). It should always return list of item names, not ItemSt...
author
Ilya Zhuravlev
<zhuravlevilya@ya.ru>
Sun, 2 Dec 2012 16:19:06 +0000
(20:19 +0400)
committer
Ilya Zhuravlev
<zhuravlevilya@ya.ru>
Sun, 2 Dec 2012 17:09:30 +0000
(21:09 +0400)
builtin/item.lua
patch
|
blob
|
history
diff --git
a/builtin/item.lua
b/builtin/item.lua
index 4be77e1d758171aa85a56088e259339eb4eb6549..80c665c99b34a9999f7e2e6a8303b8366219d512 100644
(file)
--- a/
builtin/item.lua
+++ b/
builtin/item.lua
@@
-76,10
+76,10
@@
function minetest.get_node_drops(nodename, toolname)
local drop = ItemStack({name=nodename}):get_definition().drop
if drop == nil then
-- default drop
- return {
ItemStack({name=nodename})
}
+ return {
nodename
}
elseif type(drop) == "string" then
-- itemstring drop
- return {
ItemStack(drop)
}
+ return {
drop
}
elseif drop.items == nil then
-- drop = {} to disable default drop
return {}