don't allow items with metadata in drawers (#88)

This commit is contained in:
OgelGames 2024-02-08 02:42:03 +11:00 committed by GitHub
parent 043927831d
commit 700a0f1af6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -280,6 +280,11 @@ core.register_entity("drawers:visual", {
return 0
end
-- don't allow items with metadata
if #stack:get_meta():get_keys() > 0 then
return 0
end
-- don't allow unstackable stacks
if self.itemName == "" and stack:get_stack_max() ~= 1 then
return stack:get_count()