Added CauteirzeAction and sounds

This commit is contained in:
ZioPao
2024-01-10 22:15:06 +01:00
parent 81f9bbf6ea
commit 482fffbdd0
9 changed files with 168 additions and 65 deletions

View File

@@ -78,7 +78,7 @@ function CutLimbAction:start()
self:setOverrideHandModels(self.item:getStaticModel())
-- Setup audio
self.sound = self.character:getEmitter():playSound("Amputation_Sound")
self.sound = self.character:getEmitter():playSound("Amputation")
local radius = 5
addSound(self.character, self.character:getX(), self.character:getY(), self.character:getZ(), radius, radius)
@@ -94,13 +94,9 @@ end
function CutLimbAction:update()
self.character:setMetabolicTarget(Metabolics.HeavyWork)
-- TODO Apply it too on the patient! check if it works online
-- TODO Add sound
if self.character ~= self.patient then
self.patient:setMetabolicTarget(Metabolics.HeavyWork)
end
end
function CutLimbAction:stopSound()
@@ -116,7 +112,6 @@ function CutLimbAction:stop()
end
function CutLimbAction:perform()
-- Stop the sound
self:stopSound()
@@ -132,7 +127,6 @@ function CutLimbAction:perform()
sendClientCommand(CommandsData.modules.TOC_RELAY, CommandsData.server.Relay.RelayExecuteAmputationAction, params )
end
ISBaseTimedAction.perform(self)
end