mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
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:
@@ -19,8 +19,14 @@
|
||||
if(ishuman(user) && !check_synthetic(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/vol = H.species.cough_volume
|
||||
var/s = get_species_sound(get_gendered_sound(H))["cough"]
|
||||
if(!s && !(get_species_sound(H.species.species_sounds) == "None")) // Failsafe, so we always use the default cough/etc sounds. None will cancel out anyways.
|
||||
if(H.identifying_gender == FEMALE)
|
||||
s = get_species_sound("Human Female")["cough"]
|
||||
else // Update this if we ever get herm/etc sounds.
|
||||
s = get_species_sound("Human Male")["cough"]
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["cough"],
|
||||
"sound" = s,
|
||||
"vol" = vol,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
|
||||
@@ -12,8 +12,14 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
// CHOMPEdit Start: Standardize Species Sounds
|
||||
var/vol = H.species.sneeze_volume
|
||||
var/s = get_species_sound(get_gendered_sound(H))["sneeze"]
|
||||
if(!s && !(get_species_sound(H.species.species_sounds) == "None")) // Failsafe, so we always use the default sneeze/etc sounds. None will cancel out anyways.
|
||||
if(H.identifying_gender == FEMALE)
|
||||
s = get_species_sound("Human Female")["sneeze"]
|
||||
else // Update this if we ever get herm/etc sounds.
|
||||
s = get_species_sound("Human Male")["sneeze"]
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["sneeze"],
|
||||
"sound" = s,
|
||||
"vol" = vol,
|
||||
"exr" = 20,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
|
||||
Reference in New Issue
Block a user