From 700a0f1af609b77ccb316e8da6aaeb564cbba04d Mon Sep 17 00:00:00 2001 From: OgelGames Date: Thu, 8 Feb 2024 02:42:03 +1100 Subject: [PATCH] don't allow items with metadata in drawers (#88) --- lua/visual.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/visual.lua b/lua/visual.lua index a07446c..0e42f60 100755 --- a/lua/visual.lua +++ b/lua/visual.lua @@ -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()