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.
This commit is contained in:
MrNewb committed 2025-08-29 23:49:59 -04:00
1 parent ac9f0ae777
commit 9062e5b2a8
1 file changed
+4 -5
+4 -5
View File
@@ -191,16 +191,15 @@ Inventory.GetImagePath = function(item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135" return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end 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. -- This will open the specified shop for the src passed.
---@param src number ---@param src number
---@param id string ---@param shopTitle string
Inventory.OpenShop = function(src, id) Inventory.OpenShop = function(src, shopTitle)
local title = registeredShops[id]?.title or id TriggerClientEvent('ox_inventory:openInventory', src, 'shop', {type = shopTitle})
TriggerClientEvent('ox_inventory:openInventory', src, 'shop', {type = title})
end 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)) -- 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. -- This will register a shop, if it already exists it will return true.
---@param shopTitle string ---@param shopTitle string
---@param shopInventory table ---@param shopInventory table