Fix shelf not accepting ANY items.

This commit is contained in:
Aaron Suen 2019-03-02 22:53:28 -05:00
parent c0841b7445
commit ab2132a035
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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
})