GetPlayerInventory
This will be the final adjustment to name, felt it was more descriptive considering the alt inventory types. stash/trunk/glovebox/etc
This commit is contained in:
1 parent
3a9d85aa1b
commit
cb1bba700f
6 files changed
+15
-15
No files matched your search
@@ -17,7 +17,7 @@ Inventory.GetItemCount = function(src, item, metadata)
|
||||
return Framework.GetItemCount(src, item, metadata)
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
return Framework.GetPlayerInventory(src)
|
||||
end
|
||||
|
||||
|
||||
@@ -55,22 +55,22 @@ end
|
||||
Inventory.GetItemBySlot = function(src, slot)
|
||||
local slotData = codem:GetItemBySlot(src, slot)
|
||||
-- The keys are not documented, so this is a best guess
|
||||
for _, item in pairs(slotData) do
|
||||
for _, v in pairs(slotData) do
|
||||
return {
|
||||
name = item.name,
|
||||
label = item.name,
|
||||
weight = item.weight,
|
||||
slot = slot,
|
||||
count = item.amount,
|
||||
metadata = item.info,
|
||||
stack = item.unique,
|
||||
description = item.description
|
||||
name = v.name,
|
||||
label = v.name,
|
||||
weight = v.weight,
|
||||
slot = v.slot,
|
||||
count = v.amount,
|
||||
metadata = v.info,
|
||||
stack = v.unique,
|
||||
description = v.description
|
||||
}
|
||||
end
|
||||
return {}
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
local items = codem:GetInventory(nil, src)
|
||||
local repackedTable = {}
|
||||
for _, v in pairs(items) do
|
||||
|
||||
@@ -40,7 +40,7 @@ Inventory.GetItemCount = function(src, item, metadata)
|
||||
end
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
local playerItems = origen_inventory:GetInventory(src)
|
||||
local repackedTable = {}
|
||||
for _, v in pairs(playerItems.inventory) do
|
||||
|
||||
@@ -24,7 +24,7 @@ Inventory.GetItemCount = function(src, item, metadata)
|
||||
return ox_inventory:GetItemCount(src, item, metadata, false)
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
return ox_inventory:GetInventoryItems(src, false)
|
||||
end
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Inventory.GetItemCount = function(src, item, metadata)
|
||||
return quasar:GetItemTotalAmount(src, item)
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
local playerItems = quasar:GetInventory(src)
|
||||
local repackedTable = {}
|
||||
for _, v in pairs(playerItems) do
|
||||
|
||||
@@ -25,7 +25,7 @@ Inventory.GetItemCount = function(src, item, metadata)
|
||||
return _item.amount or 0
|
||||
end
|
||||
|
||||
Inventory.GetInventoryItems = function(src)
|
||||
Inventory.GetPlayerInventory = function(src)
|
||||
local inventory = tgiann:GetPlayerItems(src)
|
||||
local items = {}
|
||||
for _, v in pairs(inventory) do
|
||||
|
||||
Reference in new issue
Block a user