From c651b767bac2c4717a719db4c7b319710d88359b Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Fri, 9 May 2025 03:16:27 -0400 Subject: [PATCH] missing fallback added --- modules/inventory/_default/client.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/inventory/_default/client.lua b/modules/inventory/_default/client.lua index a9145b7..42853d9 100644 --- a/modules/inventory/_default/client.lua +++ b/modules/inventory/_default/client.lua @@ -1,28 +1,34 @@ ---@diagnostic disable: duplicate-set-field Inventory = Inventory or {} ----This will fallback to framework add item functions when an inventory does not have the specifiec function. +---Return the item info in oxs format, {name, label, stack, weight, description, image} ---@param item string ---@return table Inventory.GetItemInfo = function(item) return Framework.GetItemInfo(item) end ----This will fallback to framework add item functions when an inventory does not have the specifiec function. +---Will return boolean if the player has the item. ---@param item string ---@return boolean Inventory.HasItem = function(item) return Framework.HasItem(item) end ----This will fallback to framework add item functions when an inventory does not have the specifiec function. +---This will return th count of the item in the players inventory, if not found will return 0. ---@param item string ---@return number Inventory.GetItemCount = function(item) return Framework.GetItemCount(item) end ----This will provide a image of the community bridge logo if the inventory isnt bridged for the specific path. +---This will return the players inventory in the format of {name, label, count, slot, metadata} +---@return table +Inventory.GetPlayerInventory = function() + return Framework:GetPlayerInventory() +end + +---This will get the image path for this item, if not found will return placeholder. ---@param item string ---@return string Inventory.GetImagePath = function(item)