Re-added context menus for saws

This commit is contained in:
ZioPao
2023-11-11 02:58:51 +01:00
parent e8d4a37fdc
commit 9459360948
9 changed files with 130 additions and 72 deletions

View File

@@ -86,6 +86,8 @@ function AmputationHandler:execute(damagePlayer)
-- Add it to the list of cut limbs
PlayerHandler.AddLocalAmputatedLimb(self.limbName)
-- Set the highest amputation and caches them.
ISHealthPanel.GetHighestAmputation()
end
---Deletes the instance

View File

@@ -155,8 +155,7 @@ function ModDataHandler:setCutLimb(limbName, isOperated, isCicatrized, isCauteri
-- Set that a limb has been cut, to activate some functions without having to loop through the parts
self:setIsAnyLimbCut(true)
-- Set the highest amputation and caches them.
ISHealthPanel.GetHighestAmputation()
end

View File

@@ -7,12 +7,12 @@ local PlayerHandler = require("Handlers/TOC_PlayerHandler")
local ProsthesisHandler = {}
---Cache the correct texture for the Health Panel for the currently equipped prosthesis
function ProsthesisHandler.SetHealthPanelTexture()
-- TODO do it
end
---comment
---Check if a prosthesis is equippable. It depends whether the player has a cut limb or not on that specific side. There's an exception for Upper arm, obviously
---@param bodyLocation string
---@return boolean
function ProsthesisHandler.CheckIfEquippable(bodyLocation)
@@ -33,9 +33,6 @@ end
--* Overrides *--
function ISWearClothing:isValid()
local bodyLocation = self.item:getBodyLocation()
if not string.contains(bodyLocation, "TOC_ArmProst") then
@@ -45,7 +42,6 @@ function ISWearClothing:isValid()
end
end
local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
function ISClothingExtraAction:isValid()
local bodyLocation = self.item:getBodyLocation()