Skip to content

Commit

Permalink
fix(server/inventory): don't remove empty drops when in use
Browse files Browse the repository at this point in the history
Should resolve #1337.
  • Loading branch information
thelindat committed May 29, 2023
1 parent 8ce1bf5 commit e718ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/inventory/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function Inventory.Set(inv, k, v)
if inv.type ~= 'player' then
if inv.player then
inv.type = 'player'
elseif inv.type == 'drop' and not next(inv.items) then
elseif inv.type == 'drop' and not next(inv.items) and not next(inv.openedBy) then
return Inventory.Remove(inv)
else
inv.time = os.time()
Expand Down

0 comments on commit e718ff7

Please sign in to comment.