cleaned up intelisense, finsihed adding type to openstash, registration tweaks

This commit is contained in:
MrNewb committed 2025-06-07 21:55:14 -04:00
1 parent fcf0bec75a
commit baf1c3b2a9
10 files changed
+90 -97

No files matched your search

+8 -9
View File
@@ -97,15 +97,13 @@ end
---This will open the specified stash for the src passed.
---@param src number
---@param _type string
---@param id number||string
---@return nil
Inventory.OpenStash = function(src, id)
local stash = Inventory.Stashes[id]
assert(stash, "Stash not found", id)
local label = stash.label
local slots = stash.slots
local weight = stash.weight
TriggerClientEvent('community_bridge:client:codem-inventory:openStash', src, id, { label = label, slots = slots, weight = weight })
Inventory.OpenStash = function(src, _type, id)
_type = _type or "stash"
local tbl = Inventory.Stashes[id]
TriggerClientEvent('community_bridge:client:codem-inventory:openStash', src, id, { label = tbl.label, slots = tbl.slots, weight = tbl.weight })
end
@@ -118,8 +116,9 @@ end
---@param groups table
---@param coords table
---@return boolean
---@return string
Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords)
if Inventory.Stashes[id] then return true end
if Inventory.Stashes[id] then return true, id end
Inventory.Stashes[id] = {
id = id,
label = label,
@@ -129,7 +128,7 @@ Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coor
groups = groups,
coords = coords
}
return true
return true, id
end
---This will return a boolean if the player has the item.