Cleaning cleans wounds and visual too

This commit is contained in:
ZioPao
2023-12-30 00:09:54 -05:00
parent 4e4b771e41
commit f2007d56a9
5 changed files with 29 additions and 13 deletions

View File

@@ -225,9 +225,7 @@ function PlayerHandler.UpdateCicatrization()
TOC_DEBUG.print("updating cicatrization for " .. tostring(limbName))
-- TODO Check if bandaged, sutured, whatever
-- TODO Clean
-- TODO Check dirtyness of zone and add to it
--local bptEnum = StaticData.BODYLOCS_IND_BPT[limbName]
@@ -236,12 +234,16 @@ function PlayerHandler.UpdateCicatrization()
local bbptEnum = BloodBodyPartType[limbName]
--local bodyPart = bd:getBodyPart(bptEnum)
local dirtyness = visual:getDirt(bbptEnum) + visual:getBlood(bbptEnum) + modDataHandler:getWoundDirtyness(limbName)
local dirtyness = visual:getDirt(bbptEnum) + visual:getBlood(bbptEnum) + modDataHandler:getWoundDirtyness(limbName) + 0.01 -- TODO Make it customizable
if dirtyness > 1 then
dirtyness = 1
end
modDataHandler:setWoundDirtyness(limbName, dirtyness)
TOC_DEBUG.print("dirtyness for this zone: " .. tostring(dirtyness))
cicTime = cicTime - SandboxVars.TOC.CicatrizationSpeed
modDataHandler:setCicatrizationTime(limbName, cicTime)
TOC_DEBUG.print("new cicatrization time: " .. tostring(cicTime))
@@ -249,7 +251,6 @@ function PlayerHandler.UpdateCicatrization()
TOC_DEBUG.print(tostring(limbName) .. " is cicatrized")
modDataHandler:setIsCicatrized(limbName, true)
end
end
end