Fix shelf not accepting ANY items.
This commit is contained in:
parent
c0841b7445
commit
ab2132a035
@ -19,7 +19,7 @@ function nodecore.stack_add(pos, stack)
|
||||
local node = minetest.get_node(pos)
|
||||
local def = minetest.registered_items[node.name]
|
||||
if def and def.stack_allow then
|
||||
local ret = def.stack_allow(pos, node, stack, def)
|
||||
local ret = def.stack_allow(pos, node, stack)
|
||||
if ret == false then return stack end
|
||||
if ret and ret ~= true then return ret end
|
||||
end
|
||||
|
@ -59,7 +59,8 @@ minetest.register_node(modname .. ":shelf", {
|
||||
return minetest.node_dig(pos, node, digger, ...)
|
||||
end
|
||||
end,
|
||||
stack_allow = function(pos, node, stack, def)
|
||||
stack_allow = function(pos, node, stack)
|
||||
local def = minetest.registered_items[stack:get_name()]
|
||||
if def and def.groups and def.groups.container then return false end
|
||||
end
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user