This commit is contained in:
MrNewb committed 2025-01-09 07:44:06 -05:00
1 parent 92f6d42555
commit f6c503c39e
16 files changed
+4 -2

No files matched your search

@@ -0,0 +1,21 @@
if GetResourceState('codem-inventory') ~= 'started' then return end
Inventory = Inventory or {}
Inventory.GetItemInfo = function(item)
local itemData = exports['codem-inventory']:GetItemList()
if not itemData[item] then return {} end
local repackedTable = {
name = itemData.name or "Missing Name",
label = itemData.label or "Missing Label",
stack = itemData.unique or "false",
weight = itemData.weight or "0",
description = itemData.description or "none",
image = itemData.image or Inventory.GetImagePath(item),
}
return repackedTable
end
Inventory.GetImagePath = function(item)
local imagePath = string.format("nui://codem-inventory/html/images/%s.png", item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end