Fixes cause I'm dum

This commit is contained in:
ZioPao
2023-11-16 01:46:41 +01:00
parent 9a4d07900c
commit cda3a61d2a
2 changed files with 6 additions and 5 deletions

View File

@@ -150,7 +150,8 @@ function AmputationHandler:execute(damagePlayer)
CachedDataHandler.AddAmputatedLimb(username, self.limbName)
CachedDataHandler.CalculateHighestAmputatedLimbs(username)
-- If the part was actually infected, heal the player
-- TODO Check infection level!
-- If the part was actually infected, heal the player, if they were in time
if bodyPart:IsInfected() and not modDataHandler:getIsIgnoredPartInfected() then
PlayerHandler.HealZombieInfection(bd, bodyPart, self.limbName, modDataHandler)
end

View File

@@ -80,11 +80,11 @@ end
---@param modDataHandler ModDataHandler
function PlayerHandler.HealZombieInfection(bodyDamage, bodyPart, limbName, modDataHandler)
if bodyDamage:isInfected() == false then return end
bodyDamage:setInfected(false)
bodyDamage:setInfectionMortalityDuration(0)
bodyDamage:setInfectionTime(0)
bodyDamage:setInfectionLevel(0)
bodyDamage:setInfectionMortalityDuration(-1)
bodyDamage:setInfectionTime(-1)
bodyDamage:setInfectionLevel(-1)
bodyPart:SetInfected(false)
modDataHandler:setIsInfected(limbName, false)