mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-02-26 15:50:21 +01:00
Store any book in bookshelves, not only default:book
This commit is contained in:
parent
6237c70e77
commit
8adbc1031c
@ -584,15 +584,12 @@ minetest.register_node("default:bookshelf", {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local to_stack = inv:get_stack(listname, index)
|
local to_stack = inv:get_stack(listname, index)
|
||||||
if listname == "books" and to_stack:is_empty() then
|
if listname == "books" and to_stack:is_empty()
|
||||||
if stack:get_name() == "default:book" then
|
and minetest.get_item_group(stack:get_name(), "book") ~= 0 then
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
else
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user