Species Sounds Hotfix 2

Gives Cough/Sneeze/Gasp back default sounds if they lack one in their species list.
Fixes death sound doubling up.
Fixes runtime in sounds - it will now simply return null rather than trying to index the list and failing.
This commit is contained in:
Rykka Stormheart
2023-03-28 21:01:49 -07:00
parent 6916040a4d
commit c4921dfdf7
6 changed files with 26 additions and 5 deletions

View File

@@ -14,8 +14,14 @@
var/mob/living/carbon/human/H = user
// CHOMPEdit: Standardize Species Sounds Getters
var/vol = H.species.gasp_volume
var/s = get_species_sound(get_gendered_sound(H))["gasp"]
if(!s && !(get_species_sound(H.species.species_sounds) == "None")) // Failsafe, so we always use the default gasp/etc sounds. None will cancel out anyways.
if(H.identifying_gender == FEMALE)
s = get_species_sound("Human Female")["gasp"]
else // Update this if we ever get herm/etc sounds.
s = get_species_sound("Human Male")["gasp"]
return list(
"sound" = get_species_sound(get_gendered_sound(H))["gasp"],
"sound" = s,
"vol" = vol,
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
)