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:
Rykka Stormheart
2023-02-28 16:02:13 -08:00
parent 6a837244da
commit 2940d67c4d
53 changed files with 720 additions and 171 deletions

View File

@@ -1,17 +1,40 @@
/decl/emote/audible/scream/get_emote_sound(var/atom/user)
..()
var/mob/living/carbon/human/H = user
if(H.get_gender() == FEMALE)
return list(
"sound" = H.species.female_scream_sound,
"vol" = 60,
"exr" = 20,
"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_scream_sound,
"vol" = 60,
"exr" = 20,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
else
return list(
"sound" = H.species.male_scream_sound,
"vol" = 60,
"exr" = 20,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
/* // Not sure if needed, screams are a carbon-only thing rn.
else
return list(
"sound" = H.species.male_scream_sound,
"vol" = 60,
"exr" = 20,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
var/mob/living/M = user
if((M.get_gender() == FEMALE) && female_scream_sound) // If our mob has custom sounds per-gender defined, most won't.
return list(
"sound" = female_scream_sound,
"vol" = 60,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
else if((M.get_gender() == MALE) && male_scream_sound) // If our mob has custom sounds per-gender defined, most won't.
return list(
"sound" = male_scream_sound,
"vol" = 60,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
else
return list(
"sound" = scream_sound,
"vol" = 60,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
*/