Replace getItemMeta with getItemDetail
This commit is contained in:
@@ -58,7 +58,7 @@ function page.tabs.inventory:enable()
|
||||
local list = { }
|
||||
|
||||
for k, item in pairs(inv) do
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemMeta(k) end)
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemDetail(k) end)
|
||||
local key = makeKey(item)
|
||||
if not list[key] then
|
||||
item.key = key
|
||||
@@ -129,7 +129,7 @@ Event.onInterval(5, function()
|
||||
|
||||
pcall(function() -- prevent errors from some mod items
|
||||
for slot,v in pairs(ni.getInventory().list()) do
|
||||
local item = itemDB:get(v, function() ni.getInventory().getItemMeta(slot) end)
|
||||
local item = itemDB:get(v, function() ni.getInventory().getItemDetail(slot) end)
|
||||
if item then
|
||||
if context.state.autostore[makeKey(item)] then
|
||||
context:sendRequest({
|
||||
|
||||
@@ -53,7 +53,7 @@ function page:updateInventoryList()
|
||||
|
||||
for slot, item in pairs(inv) do
|
||||
if (context.state.depositAll.includeHotbar or slot > 9) and item.name ~= 'plethora:neuralconnector' then
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemMeta(slot) end)
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemDetail(slot) end)
|
||||
local key = makeKey(item)
|
||||
if not list[key] then
|
||||
item.displayName = item.displayName:match('(.+) %(damage:.+%)') or item.displayName
|
||||
@@ -89,7 +89,7 @@ function page:depositAll()
|
||||
local inv = ni.getInventory().list()
|
||||
|
||||
for slot, item in pairs(inv) do
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemMeta(slot) end)
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemDetail(slot) end)
|
||||
local key = makeKey(item)
|
||||
if not context.state.depositAll.retain[key] then
|
||||
if (context.state.depositAll.includeHotbar or slot > 9) and item.name ~= 'plethora:neuralconnector' then
|
||||
|
||||
@@ -33,7 +33,7 @@ function page:enable()
|
||||
local list = { }
|
||||
|
||||
for k, item in pairs(inv) do
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemMeta(k) end)
|
||||
item = itemDB:get(item, function() return ni.getInventory().getItemDetail(k) end)
|
||||
local key = itemDB:makeKey(item)
|
||||
if not list[key] then
|
||||
item.key = key
|
||||
|
||||
Reference in New Issue
Block a user