Skip to content

Commit

Permalink
fix(server/inventory): register stash distance on inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Nov 18, 2024
1 parent ed50569 commit 51099d4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/inventory/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ for _, stash in pairs(lib.load('data.stashes') or {}) do
slots = stash.slots,
maxWeight = stash.weight,
groups = stash.groups or stash.jobs,
coords = shared.target and stash.target?.loc or stash.coords
coords = shared.target and stash.target?.loc or stash.coords,
distance = stash.distance or 10
}
end

Expand Down Expand Up @@ -195,10 +196,8 @@ local function loadInventoryData(data, player, ignoreSecurityChecks)

if not inventory then
inventory = Inventory.Create(stash.name, stash.label or stash.name, 'stash', stash.slots, 0, stash.maxWeight, owner, nil, stash.groups)

if stash.coords then
inventory.coords = stash.coords
end
inventory.coords = stash.coords
inventory.distance = stash.distance
end
end
end
Expand Down

0 comments on commit 51099d4

Please sign in to comment.