refactor: cleaning
This commit is contained in:
@@ -17,7 +17,6 @@ ItemsController.Player = {}
|
||||
---@return number
|
||||
---@private
|
||||
function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized)
|
||||
-- FIX Broken
|
||||
local textureString = playerObj:getHumanVisual():getSkinTexture()
|
||||
local isHairy = textureString:sub(-1) == "a"
|
||||
|
||||
|
||||
@@ -143,26 +143,6 @@ function ISHealthPanel:render()
|
||||
end
|
||||
|
||||
|
||||
-- local og_ISHealthPanel_update = ISHealthPanel.update
|
||||
-- function ISHealthPanel:update()
|
||||
-- og_ISHealthPanel_update(self)
|
||||
-- -- TODO Listen for changes on other player side instead of looping this
|
||||
|
||||
|
||||
-- -- FIX Re-enable it, just for test
|
||||
-- if self.character then
|
||||
-- local locPlUsername = getPlayer():getUsername()
|
||||
-- local remPlUsername = self.character:getUsername()
|
||||
-- if locPlUsername ~= remPlUsername and self:isReallyVisible() then
|
||||
-- -- Request update for TOC DATA
|
||||
-- local key = CommandsData.GetKey(remPlUsername)
|
||||
-- --ModData.request(key)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
|
||||
-- We need to override this to force the alpha to 1
|
||||
local og_ISCharacterInfoWindow_render = ISCharacterInfoWindow.prerender
|
||||
function ISCharacterInfoWindow:prerender()
|
||||
|
||||
@@ -33,15 +33,17 @@ function BaseHandler:checkItems()
|
||||
local containers = ISInventoryPaneContextMenu.getContainers(self:getDoctor())
|
||||
local done = {}
|
||||
local childContainers = {}
|
||||
for i=1,containers:size() do
|
||||
local container = containers:get(i-1)
|
||||
done[container] = true
|
||||
table.wipe(childContainers)
|
||||
self:checkContainerItems(container, childContainers)
|
||||
for _,container2 in ipairs(childContainers) do
|
||||
if not done[container2] then
|
||||
done[container2] = true
|
||||
self:checkContainerItems(container2, nil)
|
||||
if containers ~= nil then
|
||||
for i=1, containers:size() do
|
||||
local container = containers:get(i-1)
|
||||
done[container] = true
|
||||
table.wipe(childContainers)
|
||||
self:checkContainerItems(container, childContainers)
|
||||
for _,container2 in ipairs(childContainers) do
|
||||
if not done[container2] then
|
||||
done[container2] = true
|
||||
self:checkContainerItems(container2, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -101,7 +103,7 @@ function BaseHandler:getItemOfTag(items, type)
|
||||
end
|
||||
|
||||
function BaseHandler:getAllItemsOfType(items, type)
|
||||
local items = {}
|
||||
items = {}
|
||||
for _,item in ipairs(items) do
|
||||
if item:getFullType() == type then
|
||||
table.insert(items, item)
|
||||
|
||||
@@ -13,10 +13,12 @@ end
|
||||
---Print debug
|
||||
---@param string string
|
||||
function TOC_DEBUG.print(string)
|
||||
--if isDebugEnabled() then
|
||||
local runningFile = TOC_DEBUG.getRunningFile()
|
||||
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
|
||||
--end
|
||||
if isDebugEnabled() then
|
||||
local runningFile = TOC_DEBUG.getRunningFile()
|
||||
print("[TOC]" .. "[" .. runningFile .. "] " .. tostring(string))
|
||||
else
|
||||
print(string)
|
||||
end
|
||||
end
|
||||
|
||||
---Horrendous but I don't really care about performance for this
|
||||
|
||||
Reference in New Issue
Block a user