mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Update 1.0
Refactors lists into #defines, promptly cries. This part is agony and still worked on. Simplemobs can play injury sounds as well, selecting a sound based off a global list. Pain emotes occur based on updatehealth(), with respect to silicons and such. Pain emotes also occur at a 60% chance on traumatic shock. Simplemobs can also play death sounds based off the species sounds lists. Add Mouse, Robotic, Spider, None as options to the voice list. Fixes runtime/bug with Silicons (borgs) trying to get species var.
This commit is contained in:
@@ -7,28 +7,57 @@
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
return "You [pick(H.species.pain_verb_1p)] in pain!"
|
||||
else
|
||||
var/mob/living/M = user
|
||||
if(M.pain_emote_1p) // Sanity
|
||||
return "You [pick(M.pain_emote_1p)]!"
|
||||
. = ..()
|
||||
|
||||
/decl/emote/audible/pain/get_emote_message_3p(var/atom/user, var/atom/target, var/extra_params)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
return "[pick(H.species.pain_verb_3p)] in pain!"
|
||||
else
|
||||
var/mob/living/M = user
|
||||
if(M.pain_emote_3p) // Sanity
|
||||
return "[pick(M.pain_emote_3p)]!"
|
||||
. = ..()
|
||||
|
||||
/decl/emote/audible/pain/get_emote_sound(var/atom/user)
|
||||
..()
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_gender() == FEMALE)
|
||||
return list(
|
||||
"sound" = H.species.female_pain_sound,
|
||||
"vol" = 60,
|
||||
"exr" = 10,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_gender() == FEMALE)
|
||||
return list(
|
||||
"sound" = H.species.female_pain_sound,
|
||||
"vol" = 60,
|
||||
"exr" = 10,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
else
|
||||
return list(
|
||||
"sound" = H.species.male_pain_sound,
|
||||
"vol" = 60,
|
||||
"exr" = 10,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
else
|
||||
return list(
|
||||
"sound" = H.species.male_pain_sound,
|
||||
"vol" = 60,
|
||||
"exr" = 10,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
var/mob/living/M = user
|
||||
if((M.get_gender() == FEMALE) && M.female_pain_sound) // If our mob has custom sounds per-gender defined, most won't.
|
||||
return list(
|
||||
"sound" = M.female_pain_sound,
|
||||
"vol" = 80,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
else if((M.get_gender() == MALE) && M.male_pain_sound) // If our mob has custom sounds per-gender defined, most won't.
|
||||
return list(
|
||||
"sound" = M.male_pain_sound,
|
||||
"vol" = 80,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
else
|
||||
return list(
|
||||
"sound" = M.pain_sound,
|
||||
"vol" = 80,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user