casing, RegisterModule adjustments, remove duplicate utilities table

This commit is contained in:
MrNewb committed 2025-01-10 16:36:20 -05:00
1 parent 515d4412b1
commit 733271562d
75 files changed
+1739 -14

No files matched your search

@@ -0,0 +1,24 @@
if GetResourceState('origen_inventory') ~= 'started' then return end
Inventory = Inventory or {}
local origen_inventory = exports.origen_inventory
Inventory.GetItemInfo = function(item)
local itemData = origen_inventory:Items(item)
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 or {}
end
Inventory.GetImagePath = function(item)
local file = LoadResourceFile("origen_inventory", string.format("html/images/%s.png", item))
local imagePath = file and string.format("nui://origen_inventory/html/images/%s.png", item)
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
end