From 9062e5b2a807b8bb78310aead8043e5b1e7902d9 Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Fri, 29 Aug 2025 23:49:59 -0400 Subject: [PATCH] Restore shop opening logic to pre-e06e04a behavior Reverts breaking changes from commit #e06e04a by restoring the previous shop opening logic. This fixes compatibility issues with multiple resources that were affected by the change. --- modules/inventory/ox_inventory/server.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/inventory/ox_inventory/server.lua b/modules/inventory/ox_inventory/server.lua index 71750be..eb3afd0 100644 --- a/modules/inventory/ox_inventory/server.lua +++ b/modules/inventory/ox_inventory/server.lua @@ -191,16 +191,15 @@ Inventory.GetImagePath = function(item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" end +-- restores shops to before commit #e06e04a (no depreication path followed, breaking change and not present on all inventories so undoing it. (also breaking multiple resources)) -- This will open the specified shop for the src passed. ---@param src number ----@param id string -Inventory.OpenShop = function(src, id) - local title = registeredShops[id]?.title or id - TriggerClientEvent('ox_inventory:openInventory', src, 'shop', {type = title}) +---@param shopTitle string +Inventory.OpenShop = function(src, shopTitle) + TriggerClientEvent('ox_inventory:openInventory', src, 'shop', {type = shopTitle}) end -- restores shops to before commit #e06e04a (no depreication path followed, breaking change and not present on all inventories so undoing it. (also breaking multiple resources)) - -- This will register a shop, if it already exists it will return true. ---@param shopTitle string ---@param shopInventory table