I'm an idiot and I don't need workarounds to hide items in the inventory :)))

This commit is contained in:
ZioPao
2024-03-19 22:35:42 +01:00
parent 40fe46c1c6
commit 72f225f154
3 changed files with 123 additions and 11 deletions

View File

@@ -143,13 +143,33 @@ local og_ISInventoryPane_refreshContainer = ISInventoryPane.refreshContainer
function ISInventoryPane:refreshContainer()
og_ISInventoryPane_refreshContainer(self)
if TOC_DEBUG.disablePaneMod then return end
for i=1, #self.itemslist do
local cItem = self.itemslist[i]
if cItem and cItem.cat == "Amputation" then
for k, v in ipairs(self.itemslist) do
if v and v.cat == "Amputation" then
TOC_DEBUG.print("Refreshing container - current item is an amputation, removing it from the list of the container")
table.remove(self.itemslist, i)
TOC_DEBUG.print("Current Item: " .. v.name)
TOC_DEBUG.print("Index: " .. tostring(k))
end
end
self.inventory:setDrawDirty(true)
-- for i=1, #self.itemslist do
-- local cItem = self.itemslist[i]
-- if cItem and cItem.cat == "Amputation" then
-- TOC_DEBUG.print("Refreshing container - current item is an amputation, removing it from the list of the container")
-- TOC_DEBUG.print("Current Item: " .. cItem.name)
-- --self.itemsList[i] = nil
-- --table.remove(self.itemslist, i)
-- end
-- end
end
return ItemsController