inv diagnostics + repacked tables

This commit is contained in:
MrNewb committed 2025-05-09 02:00:02 -04:00
1 parent c0662e1069
commit 485c2d3460
20 files changed
+69 -36

No files matched your search

+3 -6
View File
@@ -1,3 +1,4 @@
---@diagnostic disable: duplicate-set-field
if GetResourceState('ox_inventory') ~= 'started' then return end
local ox_inventory = exports.ox_inventory
@@ -19,18 +20,14 @@ end
Inventory.GetItemInfo = function(item)
local itemData = ox_inventory:Items(item)
if not itemData then return {} end
local repackedTable = {
return {
name = itemData.name or "Missing Name",
label = itemData.label or "Missing Label",
stack = itemData.stack or "true",
weight = itemData.weight or "0",
description = itemData.description or "none",
image = string.format("nui://ox_inventory/web/images/%s", itemData.client
and itemData.client.image
or string.format("%s.png", item)
),
image = string.format("nui://ox_inventory/web/images/%s", itemData.client and itemData.client.image or string.format("%s.png", item)),
}
return repackedTable
end
-- string.format("nui://ox_inventory/web/images/%s.png", item)