Skip to content

Commit

Permalink
don't allow items with metadata in drawers (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames authored Feb 7, 2024
1 parent 0439278 commit 700a0f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/visual.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 700a0f1

Please sign in to comment.