From 59906aa02282395a32b4833cf4ac30e48f169a52 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Fri, 13 Jun 2025 18:08:45 -0400 Subject: [PATCH 1/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index edc3634..e93a27a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@
+![Used by 500+ servers](https://img.shields.io/badge/used%20by-500%2B%20servers-6e7781?style=flat&logo=github) ![](https://img.shields.io/github/contributors/The-Order-Of-The-Sacred-Framework/community_bridge?logo=github) ![](https://img.shields.io/github/v/release/The-Order-Of-The-Sacred-Framework/community_bridge?logo=github) From fd15b4e8a1809870ca2f31a978797343c32016ba Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Sun, 15 Jun 2025 03:51:14 -0400 Subject: [PATCH 2/5] enable skills module --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c8fbbcc..9751263 100644 --- a/init.lua +++ b/init.lua @@ -72,7 +72,7 @@ Bridge.RegisterModule("Require", Require) -- Bridge.RegisterModule("Perlin", cLib.Perlin) -- Bridge.RegisterModule("Actions", cLib.Actions) -- Bridge.RegisterModule("Cache", cLib.Cache) --- Bridge.RegisterModule("Skills", Skills) +Bridge.RegisterModule("Skills", Skills) for k, v in pairs(cLib) do 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 3/5] 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. --- From 914beede4e7494c1eba14864326ea1fc2a513f6c Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:43:20 -0400 Subject: [PATCH 4/5] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 2ee3a2c..a9912ff 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -5,7 +5,7 @@ use_experimental_fxv2_oal 'yes' author 'The Order of the Sacred Framework' name 'community_bridge' description 'A Universal Bridge for Our Community, created by a group of contributors with a shared vision to enhance both user and developer experiences. This bridge connects various frameworks, inventories, target systems, notification systems, and more, fostering compatibility and seamless integration.' -version '0.9.1' +version '0.9.2' shared_scripts { '@ox_lib/init.lua', From 0de3a048be17376704f734f92cf12c55d4e5524d Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:55:22 -0400 Subject: [PATCH 5/5] prevent imposters multiple inventories provide as ox but dont support many of the exports, because of this we have to do solutions like this. --- modules/inventory/ox_inventory/client.lua | 3 +++ modules/inventory/ox_inventory/server.lua | 2 ++ 2 files changed, 5 insertions(+) diff --git a/modules/inventory/ox_inventory/client.lua b/modules/inventory/ox_inventory/client.lua index a8eed08..5539a97 100644 --- a/modules/inventory/ox_inventory/client.lua +++ b/modules/inventory/ox_inventory/client.lua @@ -1,5 +1,8 @@ ---@diagnostic disable: duplicate-set-field if GetResourceState('ox_inventory') ~= 'started' then return end +if GetResourceState('qs-inventory') == 'started' then return end +if GetResourceState('origen_inventory') == 'started' then return end + local ox_inventory = exports.ox_inventory Inventory = Inventory or {} diff --git a/modules/inventory/ox_inventory/server.lua b/modules/inventory/ox_inventory/server.lua index 1bd2d3b..35578e0 100644 --- a/modules/inventory/ox_inventory/server.lua +++ b/modules/inventory/ox_inventory/server.lua @@ -1,5 +1,7 @@ ---@diagnostic disable: duplicate-set-field if GetResourceState('ox_inventory') ~= 'started' then return end +if GetResourceState('qs-inventory') == 'started' then return end +if GetResourceState('origen_inventory') == 'started' then return end local ox_inventory = exports.ox_inventory local registeredShops = {}