Skip to content

Commit

Permalink
Merge pull request #584 from Mustachedom/main
Browse files Browse the repository at this point in the history
fix for opening inventories with data
  • Loading branch information
GhzGarage authored Oct 17, 2024
2 parents 71c6967 + ed79102 commit 19197a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ function OpenInventory(source, identifier, data)
end

if not inventory then inventory = InitializeInventory(identifier, data) end
inventory.maxweight = (inventory and inventory.maxweight) or (data and data.maxweight) or Config.StashSize.maxweight
inventory.slots = (inventory and inventory.slots) or (data and data.slots) or Config.StashSize.slots
inventory.label = (inventory and inventory.label) or (data and data.label) or identifier
inventory.maxweight = (data and data.maxweight) or (inventory and inventory.maxweight) or Config.StashSize.maxweight
inventory.slots = (data and data.slots) or (inventory and inventory.slots) or Config.StashSize.slots
inventory.label = (data and data.label) or (inventory and inventory.label) or identifier
inventory.isOpen = source

local formattedInventory = {
Expand Down

0 comments on commit 19197a2

Please sign in to comment.