Shops all register/open server side

This allows for fallback system to take over
This commit is contained in:
MrNewb committed 2025-06-16 21:40:51 -04:00
1 parent fd15b4e8a1
commit 60676d8493
6 files changed
-86

No files matched your search

@@ -184,21 +184,4 @@ Inventory.GetImagePath = function(item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end
-- This will open the specified shop for the src passed.
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
print("Unable to open shop for codem-inventory, I do not have access to a copy of this inventory to bridge the feature.")
end
-- This will register a shop, if it already exists it will return true.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
return true, print("Unable to Create Shop for codem-inventory, I do not have access to a copy of this inventory to bridge the feature.")
end
return Inventory
@@ -244,22 +244,6 @@ Inventory.GetImagePath = function(item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end
---This will open the specified shop for the src passed.
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
return false, print("Unable to open shop for core_inventory, I do not have access to a copy of this inventory to bridge the feature.")
end
---This will register a shop, if it already exists it will return true.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
return false, print("Unable to open shop for core_inventory, I do not have access to a copy of this inventory to bridge the feature.")
end
---<-- TODO swap to internal callback system
---This is used for the esx users, documentation doesnt show a client side available option for the inventory so we use jank callbacks to get this.
lib.callback.register('community_bridge:Callback:core_inventory', function(source)
@@ -233,21 +233,4 @@ Inventory.GetImagePath = function(item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end
-- This will open the specified shop for the src passed.
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
print("Currently runtime shops are not supported in origen_inventory")
end
-- This will register a shop, if it already exists it will return true.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
return true, print("Currently runtime shops are not supported in origen_inventory")
end
return Inventory
@@ -50,8 +50,4 @@ Inventory.GetPlayerInventory = function()
return ox_inventory:GetPlayerItems()
end
Inventory.OpenShop = function(shopTitle, shopInventory)
ox_inventory:openInventory("shop", { type = shopTitle, id = 1 })
end
return Inventory
-16
View File
@@ -227,20 +227,4 @@ Inventory.GetImagePath = function(item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end
-- This will open the specified shop for the src passed.
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
print("Currently qs shop is not bridged")
end
-- This will register a shop, if it already exists it will return true.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
return false, print("Currently qs shop is not bridged")
end
return Inventory
@@ -206,22 +206,6 @@ Inventory.GetImagePath = function(item)
end
-- This will open the specified shop for the src passed.
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
return false, print("Currently tgiann-inventory is not bridged for shops")
end
-- This will register a shop, if it already exists it will return true.
---@param shopTitle string
---@param shopInventory table
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
return false, print("Currently tgiann-inventory is not bridged for shops")
end
---UNUSED:
---This will return generic item data from the specified inventory, with the items total count.
---