From 6ae273544de08658d4dd5f0057e0a64bedb44d0a Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Mon, 9 Jun 2025 15:47:25 -0400 Subject: [PATCH] origin inventory patch the getinventory export returns a table of nested values, inside there is a inventory table. This gets us by on the compatibility. It appears that many of the exports have changed, I have tested this on the latest version with a resource that makes use of these items. Also they use amount, I "think" they used to use count but im 100% they use metadata & info tables. --- modules/inventory/origen_inventory/server.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua index aa2224e..5ffac3b 100644 --- a/modules/inventory/origen_inventory/server.lua +++ b/modules/inventory/origen_inventory/server.lua @@ -106,7 +106,8 @@ end ---@param src number ---@return table Inventory.GetPlayerInventory = function(src) - return origin:GetInventory(src) + local playerInv = origin:GetInventory(src) + return playerInv.inventory or {} end ---Returns the specified slot data as a table. @@ -115,7 +116,8 @@ end ---@param slot number ---@return table Inventory.GetItemBySlot = function(src, slot) - local inv = origin:getInventory(src) + local playerInv = origin:getInventory(src) + local inv = playerInv.inventory or {} for k, v in pairs(inv) do if v.slot == slot then return { @@ -124,7 +126,7 @@ Inventory.GetItemBySlot = function(src, slot) metadata = v.metadata, slot = v.slot, label = v.label, - count = v.count + count = v.amount } end end