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

@@ -61,16 +61,27 @@ function CleanWoundAction:perform()
--self.bodyPart:setNeedBurnWash(false)
self.bandage:Use()
-- TODO Use Water too
if isClient() then
local limbName = CommonMethods.GetLimbNameFromBodyPart(self.bodyPart)
-- TODO CHeck if correct in MP
local modDataHandler = ModDataHandler.GetInstance(self.character:getUsername())
modDataHandler:setWoundDirtyness(limbName, 0)
--sendCleanBurn(self.character, self.otherPlayer, self.bodyPart, self.bandage)
end
local limbName = CommonMethods.GetLimbNameFromBodyPart(self.bodyPart)
-- TODO CHeck if correct in MP
local modDataHandler = ModDataHandler.GetInstance(self.otherPlayer:getUsername())
modDataHandler:setWoundDirtyness(limbName, 0)
-- Clean visual
local bbptEnum = BloodBodyPartType[limbName]
---@type HumanVisual
local visual = self.otherPlayer:getHumanVisual()
visual:setDirt(bbptEnum, 0)
visual:setBlood(bbptEnum, 0)
ISHealthPanel.setBodyPartActionForPlayer(self.otherPlayer, self.bodyPart, nil, nil, nil)
end