diff --git a/code/game/sound.dm b/code/game/sound.dm index 1470bf2be97..df40c88dcb0 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -12,7 +12,7 @@ var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pagetur //var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg') var/list/computer_ambience = list('sound/goonstation/machines/ambicomp1.ogg', 'sound/goonstation/machines/ambicomp2.ogg', 'sound/goonstation/machines/ambicomp3.ogg') -/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global) +/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global, var/pitch) soundin = get_sfx(soundin) // same sound for everyone @@ -20,7 +20,7 @@ var/list/computer_ambience = list('sound/goonstation/machines/ambicomp1.ogg', 's error("[source] is an area and is trying to make the sound: [soundin]") return - var/frequency = get_rand_frequency() // Same frequency for everybody + var/frequency = pitch var/turf/turf_source = get_turf(source) // Looping through the player list has the added bonus of working for mobs inside containers diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index bc2e0274ea9..77b1dfa8dcb 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -1,12 +1,12 @@ #define EMOTE_COOLDOWN 20 //Time in deciseconds that the cooldown lasts //Emote Cooldown System (it's so simple!) -/mob/proc/handle_emote_CD() +/mob/proc/handle_emote_CD(cooldown = EMOTE_COOLDOWN) if(emote_cd == 2) return 1 // Cooldown emotes were disabled by an admin, prevent use if(src.emote_cd == 1) return 1 // Already on CD, prevent use src.emote_cd = 1 // Starting cooldown - spawn(EMOTE_COOLDOWN) + spawn(cooldown) if(emote_cd == 2) return 1 // Don't reset if cooldown emotes were disabled by an admin during the cooldown src.emote_cd = 0 // Cooldown complete, ready for more! diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index c874a5c99da..c2ff4795320 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -47,7 +47,9 @@ if(!found_slime_bodypart) //Everyone else fails, skip the emote attempt return - if("scream", "screams", "fart", "farts", "flip", "flips", "snap", "snaps") + if("scream", "screams") + on_CD = handle_emote_CD(50) //longer cooldown + if("fart", "farts", "flip", "flips", "snap", "snaps") on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm //Everything else, including typos of the above emotes else @@ -725,17 +727,12 @@ m_type = 1 else if (!muzzled) - if (!(species.name == "Vox" || species.name == "Vox Armalis")) - message = "[src] screams!" - m_type = 2 - if (prob(5)) - playsound(src.loc, 'sound/voice/WilhelmScream.ogg', 100, 1, 10) - else - playsound(src.loc, 'sound/voice/scream2.ogg', 100, 1, 10) + message = "[src] [species.scream_verb]!" + m_type = 2 + if(gender == FEMALE) + playsound(src.loc, "[species.female_scream_sound]", 80, 1, 0, pitch = get_age_pitch()) else - message = "[src] shrieks!" - m_type = 2 - playsound(src.loc, 'sound/voice/shriek1.ogg', 100, 1, 10) + playsound(src.loc, "[species.male_scream_sound]", 80, 1, 0, pitch = get_age_pitch()) //default to male screams if no gender is present. else message = "[src] makes a very loud noise." diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2cfa124b9a1..faa648ce31f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1912,3 +1912,6 @@ else src << "You swallow a gulp of [toDrink]." return 1 + +/mob/living/carbon/human/proc/get_age_pitch() + return 1.0 + 0.5*(30 - age)/80 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index 63806936e43..5f9828f1b45 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -19,6 +19,10 @@ eyes = "blank_eyes" death_message = "lets out a faint chimper as it collapses and stops moving..." + scream_verb = "screeches" + male_scream_sound = 'sound/goonstation/voice/monkey_scream.ogg' + female_scream_sound = 'sound/goonstation/voice/monkey_scream.ogg' + tail = "chimptail" bodyflags = FEET_PADDED | HAS_TAIL reagent_tag = PROCESS_ORG diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index dddd2522ff2..a003434c1a3 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -104,6 +104,9 @@ var/secondary_langs = list() // The names of secondary languages that are available to this species. var/list/speech_sounds // A list of sounds to potentially play when speaking. var/list/speech_chance // The likelihood of a speech sound playing. + var/scream_verb = "screams" + var/male_scream_sound = 'sound/goonstation/voice/male_scream.ogg' + var/female_scream_sound = 'sound/goonstation/voice/female_scream.ogg' // Determines the organs that the species spawns with and var/list/has_organ = list( // which required-organ checks are conducted. diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index cf0fe7d91c3..5d1428cf359 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -231,6 +231,9 @@ flesh_color = "#808D11" reagent_tag = PROCESS_ORG + scream_verb = "shrieks" + male_scream_sound = 'sound/voice/shriek1.ogg' + female_scream_sound = 'sound/voice/shriek1.ogg' suicide_messages = list( "is attempting to bite their tongue off!", @@ -717,6 +720,8 @@ virus_immune = 1 can_revive_by_healing = 1 reagent_tag = PROCESS_SYN + male_scream_sound = 'sound/goonstation/voice/robot_scream.ogg' + female_scream_sound = 'sound/goonstation/voice/robot_scream.ogg' has_organ = list( "brain" = /obj/item/organ/internal/brain/mmi_holder/posibrain, diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm index 7da4fe1f2ca..cd6bd83af64 100644 --- a/code/modules/mob/living/silicon/emote.dm +++ b/code/modules/mob/living/silicon/emote.dm @@ -13,6 +13,8 @@ var/on_CD = 0 switch(act) //Cooldown-inducing emotes + if("scream", "screams") + on_CD = handle_emote_CD(50) //longer cooldown if("ping","buzz","beep","yes","no") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT. on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm //Everything else, including typos of the above emotes @@ -109,4 +111,9 @@ playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0) m_type = 2 + if("scream", "screams") + message = "[src] screams!" + playsound(src.loc, 'sound/goonstation/voice/robot_scream.ogg', 80, 0) + m_type = 2 + ..(act, m_type, message) \ No newline at end of file diff --git a/sound/goonstation/voice/female_scream.ogg b/sound/goonstation/voice/female_scream.ogg new file mode 100644 index 00000000000..a409cd01935 Binary files /dev/null and b/sound/goonstation/voice/female_scream.ogg differ diff --git a/sound/goonstation/voice/male_scream.ogg b/sound/goonstation/voice/male_scream.ogg new file mode 100644 index 00000000000..e7c1571f6d4 Binary files /dev/null and b/sound/goonstation/voice/male_scream.ogg differ diff --git a/sound/goonstation/voice/monkey_scream.ogg b/sound/goonstation/voice/monkey_scream.ogg new file mode 100644 index 00000000000..3aaf0f65cec Binary files /dev/null and b/sound/goonstation/voice/monkey_scream.ogg differ diff --git a/sound/goonstation/voice/robot_scream.ogg b/sound/goonstation/voice/robot_scream.ogg new file mode 100644 index 00000000000..a14b3ad0b14 Binary files /dev/null and b/sound/goonstation/voice/robot_scream.ogg differ diff --git a/sound/voice/scream2.ogg b/sound/voice/scream2.ogg deleted file mode 100644 index 100756b6125..00000000000 Binary files a/sound/voice/scream2.ogg and /dev/null differ