fixed amputation sound

This commit is contained in:
Pao
2023-01-28 19:40:39 +01:00
parent 70e431beef
commit 38489a3194
5 changed files with 24 additions and 13 deletions

View File

@@ -22,11 +22,22 @@ function ISCutLimb:update()
end end
end end
function ISCutLimb:stop()
self.character:getEmitter():stopSoundByName("Amputation_Sound")
end
function ISCutLimb:start() function ISCutLimb:start()
self:setActionAnim("SawLog") self:setActionAnim("SawLog")
local saw_item = TocGetSawInInventory(self.surgeon) local saw_item = TocGetSawInInventory(self.surgeon)
self.sound = self.character:getEmitter():playSound("Amputation_Sound")
-- Return whatever object we've got in the inventory -- Return whatever object we've got in the inventory
if self.surgeon:getPrimaryHandItem() then if self.surgeon:getPrimaryHandItem() then

View File

@@ -21,10 +21,10 @@ function ISOperateLimb:update()
end end
function ISOperateLimb:start() function ISOperateLimb:start()
self:setActionAnim("MedicalCheck"); self:setActionAnim("MedicalCheck")
if self.use_oven then if self.use_oven then
self.sound = self.patient:getEmitter():playSound("Burn_sound") self.sound = self.patient:getEmitter():playSound("Burn_sound") -- TODO currently broken, but maybe that's good
self:forceComplete(); self:forceComplete()
end end
end end

View File

@@ -23,4 +23,4 @@ local function AddProfession()
end end
end end
Events.OnGameBoot.Add(AddProfession); Events.OnGameBoot.Add(AddProfession)

View File

@@ -4,7 +4,7 @@ imports
{ {
Base Base
} }
/****************** Clothing that look like a cut arm ******************/ /****************** Clothing that look like a cut limb ******************/
item Amputation_Right_Hand item Amputation_Right_Hand
{ {
Type = Clothing, Type = Clothing,
@@ -114,7 +114,7 @@ imports
CanHaveHoles = false, CanHaveHoles = false,
} }
/************************ Other items ************************/ /************************ Operation items ************************/
item Improvised_surgeon_kit item Improvised_surgeon_kit
{ {
Type = Normal, Type = Normal,
@@ -148,7 +148,7 @@ imports
Icon = surgeonKit, Icon = surgeonKit,
} }
/************************ Prothese cloth ************************/ /************************ Prosthesis clothing item ************************/
item Prost_Right_Hand_WoodenHook item Prost_Right_Hand_WoodenHook
{ {
@@ -334,7 +334,7 @@ imports
CanHaveHoles = false, CanHaveHoles = false,
} }
/************************ Prothese items ************************/ /************************ Prosthesis base items ************************/
item WoodenHook item WoodenHook
{ {

View File

@@ -1,9 +1,9 @@
module base { module base {
sound Cut_sound { sound Amputation_Sound {
category = TOC, category = Player,
loop = true, loop = true,
is3D = true, is3D = true,
clip { clip {
file = media/sound/Cut_sound.ogg, file = media/sound/Cut_sound.ogg,
distanceMax = 3, distanceMax = 3,
@@ -12,7 +12,7 @@ module base {
} }
sound Operate_sound { sound Operate_sound {
category = TOC, category = Player,
loop = true, loop = true,
is3D = true, is3D = true,
clip { clip {
@@ -23,7 +23,7 @@ module base {
} }
sound Burn_sound { sound Burn_sound {
category = TOC, category = Player,
loop = false, loop = false,
is3D = true, is3D = true,
clip { clip {