projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31edc5a
)
Fix possible stacking of books in bookshelf
author
PilzAdam
<pilzadam@minetest.net>
Sat, 6 Dec 2014 10:43:07 +0000
(11:43 +0100)
committer
PilzAdam
<pilzadam@minetest.net>
Sat, 6 Dec 2014 10:43:07 +0000
(11:43 +0100)
Original author: @MT-Modder
mods/default/nodes.lua
patch
|
blob
|
history
diff --git
a/mods/default/nodes.lua
b/mods/default/nodes.lua
index 84f5f947f2e37fd615c9d2d9070cfd15b59cd57e..3fe0fe801ca603a9d235cb54b317c63f375989a5 100644
(file)
--- a/
mods/default/nodes.lua
+++ b/
mods/default/nodes.lua
@@
-407,8
+407,9
@@
minetest.register_node("default:bookshelf", {
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
+ local to_stack = inv:get_stack(listname, index)
if listname == "books" then
- if stack:get_name() == "default:book" then
+ if stack:get_name() == "default:book"
and to_stack:is_empty()
then
return 1
else
return 0