diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index ac1a203e4b..7825f16c1b 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -98,6 +98,12 @@ var/list/_client_preferences_by_type key = "DIGEST_NOISES" enabled_description = "Noisy" disabled_description = "Silent" + +/datum/client_preference/emote_noises + description = "Emote Noises" //MERP + key = "EMOTE_NOISES" + enabled_description = "Noisy" + disabled_description = "Silent" //VOREStation Add End /datum/client_preference/weather_sounds description ="Weather sounds" @@ -135,11 +141,11 @@ var/list/_client_preferences_by_type enabled_description = "Show" disabled_description = "Hide" -/datum/client_preference/air_pump_noise - description ="Air Pump Ambient Noise" - key = "SOUND_AIRPUMP" - enabled_description = "Audible" - disabled_description = "Silent" +/datum/client_preference/air_pump_noise + description ="Air Pump Ambient Noise" + key = "SOUND_AIRPUMP" + enabled_description = "Audible" + disabled_description = "Silent" /datum/client_preference/mob_tooltips description ="Mob tooltips" diff --git a/code/modules/client/preferences_vr.dm b/code/modules/client/preferences_vr.dm index 746a95d6db..97074d3298 100644 --- a/code/modules/client/preferences_vr.dm +++ b/code/modules/client/preferences_vr.dm @@ -34,3 +34,19 @@ datum/preferences SScharacter_setup.queue_preferences_save(prefs) feedback_add_details("admin_verb","TDigestNoise") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + +/client/verb/toggle_emote_noises() + set name = "Emote Noises" + set category = "Preferences" + set desc = "Toggles emote noises." + + var/pref_path = /datum/client_preference/emote_noises + + toggle_preference(pref_path) + + to_chat(src, "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear emote-related noises.") + + SScharacter_setup.queue_preferences_save(prefs) + + feedback_add_details("admin_verb","TEmoteNoise") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index f3d9f2fb6f..eafda1ae33 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -76,7 +76,7 @@ message = "[display_msg] at [param]." else message = "[display_msg]." - playsound(src.loc, use_sound, 50, 0) + playsound(src.loc, use_sound, 50, 0, preference = /datum/client_preference/emote_noises) //VOREStation Add m_type = 1 //Promethean-only emotes @@ -86,10 +86,23 @@ to_chat(src, "You are not a slime thing!") return */ //VOREStation Removal End - playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound. + playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0, preference = /datum/client_preference/emote_noises) //VOREStation Add //Credit to DrMinky (freesound.org) for the sound. message = "squishes." m_type = 1 +//CHOMPStation re-add/removal Start TFF 26/3/20 - Re-adds code and comments it out for posterity. Why was this gone? + //Skrell-only emotes +/* + if("warble") + if(species.name != SPECIES_SKRELL) + to_chat(src, "You are not a Skrell!") + return + + playsound(src.loc, 'sound/effects/warble.ogg', 50, 0, preference = /datum/client_preference/emote_noises) //VOREStation Add // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound. + message = "warbles." + m_type = 2 +*/ +//CHOMPStation re-add/removal End if ("blink") message = "blinks." @@ -179,7 +192,7 @@ if ("clap") if (!src.restrained()) message = "claps." - playsound(src.loc, 'sound/misc/clapping.ogg') + playsound(src.loc, 'sound/misc/clapping.ogg', preference = /datum/client_preference/emote_noises) //VOREStation Add m_type = 2 if(miming) m_type = 1 @@ -249,10 +262,10 @@ message = "coughs!" if(get_gender() == FEMALE) if(species.female_cough_sounds) - playsound(src, pick(species.female_cough_sounds), 120) + playsound(src, pick(species.female_cough_sounds), 120, preference = /datum/client_preference/emote_noises) //VOREStation Add else if(species.male_cough_sounds) - playsound(src, pick(species.male_cough_sounds), 120) + playsound(src, pick(species.male_cough_sounds), 120, preference = /datum/client_preference/emote_noises) //VOREStation Add else message = "emits a robotic cough" var/use_sound @@ -260,7 +273,7 @@ use_sound = pick('sound/effects/mob_effects/f_machine_cougha.ogg','sound/effects/mob_effects/f_machine_coughb.ogg') else use_sound = pick('sound/effects/mob_effects/m_machine_cougha.ogg','sound/effects/mob_effects/m_machine_coughb.ogg', 'sound/effects/mob_effects/m_machine_coughc.ogg') - playsound(src.loc, use_sound, 50, 0) + playsound(src.loc, use_sound, 50, 0, preference = /datum/client_preference/emote_noises) //VOREStation Add else message = "makes a strong noise." m_type = 2 @@ -537,9 +550,9 @@ if(!robotic) message = "sneezes." if(get_gender() == FEMALE) - playsound(src, species.female_sneeze_sound, 70) + playsound(src, species.female_sneeze_sound, 70, preference = /datum/client_preference/emote_noises) //VOREStation Add else - playsound(src, species.male_sneeze_sound, 70) + playsound(src, species.male_sneeze_sound, 70, preference = /datum/client_preference/emote_noises) //VOREStation Add m_type = 2 else message = "emits a robotic sneeze" @@ -548,7 +561,7 @@ use_sound = 'sound/effects/mob_effects/machine_sneeze.ogg' else use_sound = 'sound/effects/mob_effects/f_machine_sneeze.ogg' - playsound(src.loc, use_sound, 50, 0) + playsound(src.loc, use_sound, 50, 0, preference = /datum/client_preference/emote_noises) //VOREStation Add else message = "makes a strange noise." m_type = 2 @@ -661,14 +674,14 @@ break if(M) message = "slaps [M] across the face. Ouch!" - playsound(loc, 'sound/effects/snap.ogg', 50, 1) + playsound(loc, 'sound/effects/snap.ogg', 50, 1, preference = /datum/client_preference/emote_noises) //VOREStation Add if(ishuman(M)) //Snowflakey! var/mob/living/carbon/human/H = M if(istype(H.wear_mask,/obj/item/clothing/mask/smokable)) H.drop_from_inventory(H.wear_mask) else message = "slaps [T.himself]!" - playsound(loc, 'sound/effects/snap.ogg', 50, 1) + playsound(loc, 'sound/effects/snap.ogg', 50, 1, preference = /datum/client_preference/emote_noises) //VOREStation Add if("scream", "screams") if(miming) @@ -705,7 +718,7 @@ return message = "snaps [T.his] fingers." - playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3) + playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3, preference = /datum/client_preference/emote_noises) //VOREStation Add if("swish") src.animate_tail_once() @@ -729,14 +742,14 @@ if("whistle" || "whistles") if(!muzzled) message = "whistles a tune." - playsound(loc, 'sound/misc/longwhistle.ogg') //praying this doesn't get abused + playsound(loc, 'sound/misc/longwhistle.ogg', preference = /datum/client_preference/emote_noises) //VOREStation Add else message = "makes a light spitting noise, a poor attempt at a whistle." if("qwhistle") if(!muzzled) message = "whistles quietly." - playsound(loc, 'sound/misc/shortwhistle.ogg') + playsound(loc, 'sound/misc/shortwhistle.ogg', preference = /datum/client_preference/emote_noises) //VOREStation Add else message = "makes a light spitting noise, a poor attempt at a whistle." diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index e5db4fe87f..b71ffccee4 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -26,43 +26,43 @@ if ("awoo") m_type = 2 message = "lets out an awoo." - playsound(loc, 'sound/voice/awoo.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/awoo.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("howl") // YW add begins m_type = 2 message = "lets out a howl." - playsound(loc, 'sound/voice/howl.ogg', 50, 1, -1) // YW add ends + playsound(loc, 'sound/voice/howl.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) // YW add ends if ("nya") message = "lets out a nya." m_type = 2 - playsound(loc, 'sound/voice/nya.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/nya.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("peep") message = "peeps like a bird." m_type = 2 - playsound(loc, 'sound/voice/peep.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/peep.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("chirp") message = "chirps!" - playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0) + playsound(src.loc, 'sound/misc/nymphchirp.ogg', 50, 0, preference = /datum/client_preference/emote_noises) m_type = 2 if ("weh") message = "lets out a weh." m_type = 2 - playsound(loc, 'sound/voice/weh.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/weh.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("merp") message = "lets out a merp." m_type = 2 - playsound(loc, 'sound/voice/merp.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/merp.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("bark") message = "lets out a bark." m_type = 2 - playsound(loc, 'sound/voice/bark2.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/bark2.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("his") message = "lets out a hiss." m_type = 2 - playsound(loc, 'sound/voice/hiss.ogg', 50, 1, -1) + playsound(loc, 'sound/voice/hiss.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("squeak") message = "lets out a squeak." m_type = 2 - playsound(loc, 'sound/effects/mouse_squeak.ogg', 50, 1, -1) + playsound(loc, 'sound/effects/mouse_squeak.ogg', 50, 1, -1, preference = /datum/client_preference/emote_noises) if ("nsay") nsay() return TRUE