Fixes to CutLimbHandler

This commit is contained in:
ZioPao
2023-11-13 23:46:35 +01:00
parent 4fb19ae5a6
commit 56da8583b0
9 changed files with 109 additions and 38 deletions

View File

@@ -40,8 +40,25 @@ function AmputationHandler:new(limbName, surgeonPl)
end
--* Static methods *--
---comment
---@param player IsoPlayer
---@param limbName string
function AmputationHandler.ApplyDamageDuringAmputation(player, limbName)
local bodyDamage = player:getBodyDamage()
local bodyPartType = BodyPartType[limbName]
local bodyDamagePart = bodyDamage:getBodyPart(bodyPartType)
TOC_DEBUG.print("damage patient - " .. tostring(bodyPartType))
bodyDamagePart:setBleeding(true)
bodyDamagePart:setCut(true)
bodyDamagePart:setBleedingTime(ZombRand(10, 20))
end
--* Main methods *--
---Damage the player part during the amputation process
function AmputationHandler:damageDuringAmputation()
local bodyDamage = self.patientPl:getBodyDamage()