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:
Rykka Stormheart
2023-03-01 23:55:19 -08:00
parent 2940d67c4d
commit 9c80b225aa
87 changed files with 391 additions and 757 deletions
@@ -12,17 +12,10 @@
/decl/emote/audible/gasp/get_emote_sound(var/atom/user)
..()
var/mob/living/carbon/human/H = user
if(H.get_gender() == FEMALE)
return list(
"sound" = H.species.female_gasp_sound,
"vol" = 60,
"exr" = 10,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
)
else
return list(
"sound" = H.species.male_gasp_sound,
"vol" = 60,
"exr" = 10,
"volchannel" = VOLUME_CHANNEL_INJ_DEATH
// CHOMPEdit: Standardize Species Sounds Getters
var/vol = H.species.gasp_volume
return list(
"sound" = get_species_sound(get_gendered_sound(H))["gasp"],
"vol" = vol,
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
)
@@ -27,37 +27,18 @@
..()
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
var/vol = H.species.pain_volume
return list(
"sound" = get_species_sound(get_gendered_sound(H))["pain"],
"vol" = vol,
"exr" = 20,
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
)
else
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
return list(
"sound" = get_species_sound(get_gendered_sound(M))["pain"],
"vol" = 50,
"exr" = 20,
"volchannel" = VOLUME_CHANNEL_SPECIES_SOUNDS
)
@@ -19,17 +19,6 @@
var/digi_allowed = FALSE
var/vanity_base_fit //when shapeshifting using vanity_copy_to, this allows you to have add something so they can go back to their original species fit
var/species_sounds
male_scream_sound = null
female_scream_sound = null
var/male_gasp_sound = null
var/female_gasp_sound = null
var/male_pain_sound = null
var/female_pain_sound = null
var/male_death_sound = null
var/female_death_sound = null
// Handles non-standard eyes when using a species that utilizes a custom base icon set.
// Eye data is stored in the head organ, and this needs to be handled specially.
/datum/species/proc/handle_base_eyes(var/mob/living/carbon/human/H, var/custom_base)
@@ -61,14 +50,3 @@
for(var/datum/trait/env_trait in env_traits)
env_trait.handle_environment_special(H)
return
/datum/species/New()
male_scream_sound = get_species_sound(male_generic_sounds["scream"])
female_scream_sound = get_species_sound(female_generic_sounds["scream"])
male_gasp_sound = get_species_sound(male_generic_sounds["gasp"])
female_gasp_sound = get_species_sound(female_generic_sounds["gasp"])
male_pain_sound = get_species_sound(male_generic_sounds["pain"])
female_pain_sound = get_species_sound(female_generic_sounds["pain"])
male_death_sound = get_species_sound(male_generic_sounds["death"])
female_death_sound = get_species_sound(female_generic_sounds["death"])
..()
@@ -30,8 +30,8 @@
breath_type = null
poison_type = null
male_scream_sound = null
female_scream_sound = null
// male_scream_sound = null
// female_scream_sound = null
virus_immune = 1
blood_volume = 0
@@ -58,14 +58,7 @@
rarity_value = 5
female_scream_sound = list('modular_chomp/sound/voice/scream_silicon.ogg', 'modular_chomp/sound/voice/android_scream.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream1.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream2.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream3.ogg')
male_scream_sound = list('modular_chomp/sound/voice/scream_silicon.ogg', 'modular_chomp/sound/voice/android_scream.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream1.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream2.ogg', 'modular_chomp/sound/voice/scream/robotic/robot_scream3.ogg')
male_gasp_sound = null // Missing gasp sounds
female_gasp_sound = null // Missing gasp sounds
male_pain_sound = list('modular_chomp/sound/voice/pain/robotic/robot_pain1.ogg', 'modular_chomp/sound/voice/pain/robotic/robot_pain2.ogg', 'modular_chomp/sound/voice/pain/robotic/robot_pain3.ogg')
female_pain_sound = list('modular_chomp/sound/voice/pain/robotic/robot_pain1.ogg', 'modular_chomp/sound/voice/pain/robotic/robot_pain2.ogg', 'modular_chomp/sound/voice/pain/robotic/robot_pain3.ogg')
male_death_sound = list('modular_chomp/sound/voice/borg_deathsound.ogg')
female_death_sound = list('modular_chomp/sound/voice/borg_deathsound.ogg')
species_sounds = "Robotic"
crit_mod = 4 //Unable to go crit
var/obj/item/weapon/rig/protean/OurRig
@@ -22,17 +22,13 @@ Maybe later, gotta figure out a way to click yourself when in a locker etc.
* TBD: Maybe port over from species to mob?
*/
var/can_pain_emote = TRUE
var/pain_sound = null
var/female_pain_sound = null
var/male_pain_sound = null
var/pain_emote_1p = null
var/pain_emote_3p = null
var/species_sounds = "None" // By default, we have nothing.
var/death_sound_override = null
/* // Not sure if needed, screams aren't a carbon thing rn.
var/scream_sound = null
var/female_scream_sound = null
var/male_scream_sound = null
var/scream_emote = null
*/
var/death_sound = null
var/male_death_sound = null
var/female_death_sound = null