allow empty stacks in inventory set_stack

fixes #4
This commit is contained in:
OgelGames 2025-05-22 18:23:34 +10:00
parent 26580085f3
commit 730f88ff07

View File

@ -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