From 730f88ff0790c73243e307cf8a9d278d0209e0a2 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Thu, 22 May 2025 18:23:34 +1000 Subject: [PATCH] allow empty stacks in inventory `set_stack` fixes #4 --- inventory.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory.lua b/inventory.lua index 69e6b4e..fab69cc 100644 --- a/inventory.lua +++ b/inventory.lua @@ -139,7 +139,7 @@ function fake_inventory:set_stack(listname, i, stack) stack = ItemStack(stack) i = math.floor(i) local list = self.lists[tostring(listname)] - if not list or not list[i] or stack:is_empty() then + if not list or not list[i] then return false end list[i] = stack