diff --git a/common/media/lua/client/TOC/Controllers/ItemsController.lua b/common/media/lua/client/TOC/Controllers/ItemsController.lua index a4fbf35..aefd899 100644 --- a/common/media/lua/client/TOC/Controllers/ItemsController.lua +++ b/common/media/lua/client/TOC/Controllers/ItemsController.lua @@ -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" diff --git a/common/media/lua/client/TOC/UI/HealthPanel.lua b/common/media/lua/client/TOC/UI/HealthPanel.lua index fea0e21..bd23334 100644 --- a/common/media/lua/client/TOC/UI/HealthPanel.lua +++ b/common/media/lua/client/TOC/UI/HealthPanel.lua @@ -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() diff --git a/common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua b/common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua index 78ced2a..953c8b2 100644 --- a/common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua +++ b/common/media/lua/client/TOC/UI/Interactions/HealthPanelBaseHandler.lua @@ -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) diff --git a/common/media/lua/shared/TOC/Debug.lua b/common/media/lua/shared/TOC/Debug.lua index d559da9..d2c6a8c 100644 --- a/common/media/lua/shared/TOC/Debug.lua +++ b/common/media/lua/shared/TOC/Debug.lua @@ -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 diff --git a/mod.info b/mod.info new file mode 100644 index 0000000..7b8bb47 --- /dev/null +++ b/mod.info @@ -0,0 +1,7 @@ +name=The Only Cure +poster=poster.png +description=You've been bitten. You have only two choices. +id=TheOnlyCure +icon=icon.png +url=https://github.com/ZioPao/The-Only-Cure +modversion=2.1.7 \ No newline at end of file