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

+4 -12
View File
@@ -105,20 +105,11 @@ end
---This will open the specified stash for the src passed.
---@param src number
---@param _type string == "trunk" || "glovebox" || "stash"
---@param _type string
---@param id number||string
---@return nil
Inventory.OpenStash = function(src, _type, id)
-- if id:sub(1, 5) == "trunk" then
-- _type = "trunk"
-- id = id:sub(5)
-- elseif id:sub(1, 6) == "glovebox" then
-- _type = "glovebox"
-- id = id:sub(6)
-- elseif id:sub(1, 5) == "stash" then
-- _type = "stash"
-- id = id:sub(5)
-- end
_type = _type or "stash"
local tbl = Inventory.Stashes[id]
return tgiann:ForceOpenInventory(src, _type, id, tbl and { maxWeight = tbl.weight , slots = tbl.slot, label = tbl.label})
end
@@ -132,6 +123,7 @@ end
---@param groups table
---@param coords table
---@return boolean
---@return string
Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords)
Inventory.Stashes[id] = {
id = id,
@@ -142,7 +134,7 @@ Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coor
groups = groups,
coords = coords
}
return id
return true, id
end
---This will return a boolean if the player has the item.