Some fixes to cicatrization handling

This commit is contained in:
ZioPao
2023-12-24 02:15:19 -05:00
parent 2c5c3885d1
commit 33140938c9
7 changed files with 44 additions and 24 deletions

View File

@@ -148,6 +148,13 @@ function AmputationHandler:execute(damagePlayer)
-- Add it to the list of cut limbs on this local client
local username = self.patientPl:getUsername()
CachedDataHandler.AddAmputatedLimb(username, self.limbName)
-- TODO Not optimal, we're already cycling through this when using setCutLimb
for i=1, #StaticData.LIMBS_DEPENDENCIES_IND_STR[self.limbName] do
local dependedLimbName = StaticData.LIMBS_DEPENDENCIES_IND_STR[self.limbName][i]
CachedDataHandler.AddAmputatedLimb(username, dependedLimbName)
end
CachedDataHandler.CalculateHighestAmputatedLimbs(username)
-- If the part was actually infected, heal the player, if they were in time (infectionLevel < 20)