mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-12-01 02:43:45 +01:00
don't allow items with metadata in drawers (#88)
This commit is contained in:
parent
043927831d
commit
700a0f1af6
@ -280,6 +280,11 @@ core.register_entity("drawers:visual", {
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- don't allow items with metadata
|
||||||
|
if #stack:get_meta():get_keys() > 0 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
-- don't allow unstackable stacks
|
-- don't allow unstackable stacks
|
||||||
if self.itemName == "" and stack:get_stack_max() ~= 1 then
|
if self.itemName == "" and stack:get_stack_max() ~= 1 then
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
|
Loading…
Reference in New Issue
Block a user