mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-23 15:20:19 +01:00
Fix bookshelf's allow_metadata_inventory_move (check if item belongs to "book" group instead of checking if it is "default:book")
This commit is contained in:
parent
d8dd9332ed
commit
15ef8b0995
@ -1402,7 +1402,8 @@ minetest.register_node("default:bookshelf", {
|
|||||||
local stack = inv:get_stack(from_list, from_index)
|
local stack = inv:get_stack(from_list, from_index)
|
||||||
local to_stack = inv:get_stack(to_list, to_index)
|
local to_stack = inv:get_stack(to_list, to_index)
|
||||||
if to_list == "books" then
|
if to_list == "books" then
|
||||||
if stack:get_name() == "default:book" and to_stack:is_empty() then
|
if minetest.get_item_group(stack:get_name(), "book") ~= 0
|
||||||
|
and to_stack:is_empty() then
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user