From 60676d8493d67703062ba04f0964c20def6907c4 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:40:51 -0400 Subject: [PATCH] Shops all register/open server side This allows for fallback system to take over --- modules/inventory/codem-inventory/server.lua | 17 ----------------- modules/inventory/core_inventory/server.lua | 16 ---------------- modules/inventory/origen_inventory/server.lua | 17 ----------------- modules/inventory/ox_inventory/client.lua | 4 ---- modules/inventory/qs-inventory/server.lua | 16 ---------------- modules/inventory/tgiann-inventory/server.lua | 16 ---------------- 6 files changed, 86 deletions(-) diff --git a/modules/inventory/codem-inventory/server.lua b/modules/inventory/codem-inventory/server.lua index e87c299..f80c7a3 100644 --- a/modules/inventory/codem-inventory/server.lua +++ b/modules/inventory/codem-inventory/server.lua @@ -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 \ No newline at end of file diff --git a/modules/inventory/core_inventory/server.lua b/modules/inventory/core_inventory/server.lua index baf9fb5..ef67251 100644 --- a/modules/inventory/core_inventory/server.lua +++ b/modules/inventory/core_inventory/server.lua @@ -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) diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua index f253e7c..756fa60 100644 --- a/modules/inventory/origen_inventory/server.lua +++ b/modules/inventory/origen_inventory/server.lua @@ -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 \ No newline at end of file diff --git a/modules/inventory/ox_inventory/client.lua b/modules/inventory/ox_inventory/client.lua index 17bbcd6..a8eed08 100644 --- a/modules/inventory/ox_inventory/client.lua +++ b/modules/inventory/ox_inventory/client.lua @@ -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 \ No newline at end of file diff --git a/modules/inventory/qs-inventory/server.lua b/modules/inventory/qs-inventory/server.lua index f29fe20..70c480b 100644 --- a/modules/inventory/qs-inventory/server.lua +++ b/modules/inventory/qs-inventory/server.lua @@ -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 \ No newline at end of file diff --git a/modules/inventory/tgiann-inventory/server.lua b/modules/inventory/tgiann-inventory/server.lua index ecca9a0..5c48b49 100644 --- a/modules/inventory/tgiann-inventory/server.lua +++ b/modules/inventory/tgiann-inventory/server.lua @@ -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. ---