mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Update 2.0
- Technical: All sounds are now using a masterlist that is indexed via keypairs, saving on overhead and copypaste. - Technical continued: Rather than defining sounds per species, go to sound.dm, add a define, following the above, then add your key + pair to species_sounds_map - for instance, `"Mouse" = mouse_sounds`. Easy as that. - All mobs refer to this list rather than defining their own pain/etc sounds. - All mobs can override death sounds with death_sound_override set to the sound (or sounds) of their choice. - Added the following sound options: Lizard, Metroid, Mouse, Raccoon, Slime, Spider, Teshari, Vox, Vulpine, Xeno - If Species Sound is set to "Unset", it will automatically grab the correct sounds for your gender *and* species, if those exist. - For developers: set `gender_specific_species_sounds` to TRUE on your species, and set `species_sounds_[gender]` (fill in gender with your chosen gender) for it to fetch these sounds. - Species can now control the volume that their emote sounds play at. Refer to the added variables in `species.dm` for details. - Cough/Sneeze/Scream/Pain/Gasp/Death sounds are all now standardized and use the same procs to fetch sounds, cutting down on copy/paste and reducing changes for things to go wrong. - Fixed multiple smaller bugs, the details of which elude me, in regards to 1.0/Original - Ported Xeno scream/roar/pain/death sounds from TGMC. - Deathgasp actually plays your death sound (TBD if this is too spammy). 2.1 - Technical: Fixed a runtime in get_default_species_sounds where it was trying to fetch from dummy mob rather than the player's preferences. - Fixed an error where chat would not display the "this set does not have 'x' sounds!" message.
This commit is contained in:
@@ -12,41 +12,23 @@
|
||||
emote_volume_synthetic = 50
|
||||
|
||||
conscious = FALSE
|
||||
emote_sound_synthetic = list(
|
||||
FEMALE = list(
|
||||
'sound/effects/mob_effects/f_machine_cougha.ogg',
|
||||
'sound/effects/mob_effects/f_machine_coughb.ogg'
|
||||
),
|
||||
MALE = list(
|
||||
'sound/effects/mob_effects/m_machine_cougha.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughb.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughc.ogg'
|
||||
),
|
||||
NEUTER = list(
|
||||
'sound/effects/mob_effects/m_machine_cougha.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughb.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughc.ogg'
|
||||
),
|
||||
PLURAL = list(
|
||||
'sound/effects/mob_effects/m_machine_cougha.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughb.ogg',
|
||||
'sound/effects/mob_effects/m_machine_coughc.ogg'
|
||||
)
|
||||
)
|
||||
// CHOMPEdit Start: Standardize Species Sounds
|
||||
// emote_sound_synthetic = list()
|
||||
|
||||
/decl/emote/audible/cough/get_emote_sound(var/atom/user)
|
||||
if(ishuman(user) && !check_synthetic(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_gender() == FEMALE)
|
||||
if(length(H.species.female_cough_sounds))
|
||||
return list(
|
||||
"sound" = H.species.female_cough_sounds,
|
||||
"vol" = emote_volume
|
||||
)
|
||||
else
|
||||
if(length(H.species.male_cough_sounds))
|
||||
return list(
|
||||
"sound" = H.species.male_cough_sounds,
|
||||
"vol" = emote_volume
|
||||
)
|
||||
var/vol = H.species.cough_volume
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["cough"],
|
||||
"vol" = vol,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
if(check_synthetic(user))
|
||||
return list(
|
||||
"sound" = get_species_sound("Robotic")["cough"],
|
||||
"vol" = emote_volume,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
// CHOMPEdit End
|
||||
return ..()
|
||||
|
||||
@@ -2,19 +2,12 @@
|
||||
..()
|
||||
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,
|
||||
var/vol = H.species.scream_volume
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["scream"],
|
||||
"vol" = vol,
|
||||
"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
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
/* // Not sure if needed, screams are a carbon-only thing rn.
|
||||
else
|
||||
@@ -23,18 +16,18 @@
|
||||
return list(
|
||||
"sound" = female_scream_sound,
|
||||
"vol" = 60,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
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
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
else
|
||||
return list(
|
||||
"sound" = scream_sound,
|
||||
"vol" = 60,
|
||||
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/decl/emote/audible/scream/get_emote_sound(var/atom/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
// CHOMPEdit Start: Commenting out bc _ch calls parent.
|
||||
/*
|
||||
if(H.get_gender() == FEMALE)
|
||||
return list(
|
||||
"sound" = H.species.female_scream_sound,
|
||||
@@ -10,4 +12,11 @@
|
||||
return list(
|
||||
"sound" = H.species.male_scream_sound,
|
||||
"vol" = emote_volume
|
||||
)
|
||||
*/
|
||||
var/vol = H.species.scream_volume
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["scream"],
|
||||
"vol" = vol,
|
||||
"exr" = 20,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
key = "sneeze"
|
||||
emote_message_1p = "You sneeze."
|
||||
emote_message_3p = "sneezes."
|
||||
emote_sound_synthetic = list(
|
||||
FEMALE = 'sound/effects/mob_effects/machine_sneeze.ogg',
|
||||
MALE = 'sound/effects/mob_effects/f_machine_sneeze.ogg',
|
||||
NEUTER = 'sound/effects/mob_effects/f_machine_sneeze.ogg',
|
||||
PLURAL = 'sound/effects/mob_effects/f_machine_sneeze.ogg'
|
||||
)
|
||||
emote_message_synthetic_1p = "You emit a robotic sneeze."
|
||||
emote_message_synthetic_1p_target = "You emit a robotic sneeze towards TARGET."
|
||||
emote_message_synthetic_3p = "emits a robotic sneeze."
|
||||
@@ -16,14 +10,13 @@
|
||||
/decl/emote/audible/sneeze/get_emote_sound(var/atom/user)
|
||||
if(ishuman(user) && !check_synthetic(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_gender() == FEMALE)
|
||||
return list(
|
||||
"sound" = H.species.female_sneeze_sound,
|
||||
"vol" = emote_volume
|
||||
)
|
||||
else
|
||||
return list(
|
||||
"sound" = H.species.male_sneeze_sound,
|
||||
"vol" = emote_volume
|
||||
// CHOMPEdit Start: Standardize Species Sounds
|
||||
var/vol = H.species.sneeze_volume
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["sneeze"],
|
||||
"vol" = vol,
|
||||
"exr" = 20,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
// CHOMPEdit End
|
||||
return ..()
|
||||
|
||||
@@ -4,12 +4,21 @@
|
||||
/decl/emote/human/deathgasp
|
||||
key = "deathgasp"
|
||||
|
||||
/decl/emote/human/deathgasp/get_emote_sound(user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/vol = H.species.death_volume
|
||||
return list(
|
||||
"sound" = get_species_sound(get_gendered_sound(H))["death"],
|
||||
"vol" = vol,
|
||||
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
|
||||
)
|
||||
|
||||
/decl/emote/human/deathgasp/do_emote(mob/living/carbon/human/user)
|
||||
if(istype(user) && user.species.get_death_message(user) == DEATHGASP_NO_MESSAGE)
|
||||
to_chat(user, SPAN_WARNING("Your species has no deathgasp."))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
. = ..()
|
||||
|
||||
/decl/emote/human/deathgasp/get_emote_message_3p(var/mob/living/carbon/human/user)
|
||||
return "[user.species.get_death_message(user)]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user