diff --git a/code/game/sound.dm b/code/game/sound.dm index 18dd9e718a..c49fd6a3b1 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -290,4 +290,6 @@ //Are these even used? //Yes var/list/keyboard_sound = list ('sound/effects/keyboard/keyboard1.ogg','sound/effects/keyboard/keyboard2.ogg','sound/effects/keyboard/keyboard3.ogg', 'sound/effects/keyboard/keyboard4.ogg') var/list/bodyfall_sound = list('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg') -var/list/teppi_sound = list('sound/voice/teppi/gyooh1.ogg', 'sound/voice/teppi/gyooh2.ogg', 'sound/voice/teppi/gyooh3.ogg', 'sound/voice/teppi/gyooh4.ogg', 'sound/voice/teppi/gyooh5.ogg', 'sound/voice/teppi/gyooh6.ogg', 'sound/voice/teppi/snoot1.ogg', 'sound/voice/teppi/snoot2.ogg') \ No newline at end of file +var/list/teppi_sound = list('sound/voice/teppi/gyooh1.ogg', 'sound/voice/teppi/gyooh2.ogg', 'sound/voice/teppi/gyooh3.ogg', 'sound/voice/teppi/gyooh4.ogg', 'sound/voice/teppi/gyooh5.ogg', 'sound/voice/teppi/gyooh6.ogg', 'sound/voice/teppi/snoot1.ogg', 'sound/voice/teppi/snoot2.ogg') +var/list/talk_sound = list('sound/talksounds/a.ogg','sound/talksounds/b.ogg','sound/talksounds/c.ogg','sound/talksounds/d.ogg','sound/talksounds/e.ogg','sound/talksounds/f.ogg','sound/talksounds/g.ogg','sound/talksounds/h.ogg') +var/list/emote_sound = list('sound/talksounds/me_a.ogg','sound/talksounds/me_b.ogg','sound/talksounds/me_c.ogg','sound/talksounds/me_d.ogg','sound/talksounds/me_e.ogg','sound/talksounds/me_f.ogg') diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index 06e44c3fd8..eff07c82ce 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -95,7 +95,7 @@ var/list/_client_preferences_by_type key = "DIGEST_NOISES" enabled_description = "Noisy" disabled_description = "Silent" - + /datum/client_preference/belch_noises // Belching noises - pref toggle for 'em description = "Burping" key = "BELCH_NOISES" @@ -108,7 +108,7 @@ var/list/_client_preferences_by_type enabled_description = "Noisy" disabled_description = "Silent" /datum/client_preference/whisubtle_vis - description = "Whi/Subtles Ghost Visible" + description = "Whi/Subtles Ghost Visible" key = "WHISUBTLE_VIS" enabled_description = "Visible" disabled_description = "Hidden" @@ -299,6 +299,18 @@ var/list/_client_preferences_by_type enabled_description = "On" disabled_description = "Off" +/datum/client_preference/say_sounds + description = "Say and whisper Sounds" + key = "SAY_SOUNDS" + enabled_description = "On" + disabled_description = "Off" + +/datum/client_preference/emote_sounds + description = "Me and Subtle Sounds" + key = "EMOTE_SOUNDS" + enabled_description = "On" + disabled_description = "Off" + /datum/client_preference/runechat_mob description = "Runechat (Mobs)" key = "RUNECHAT_MOB" diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 37a71587b1..f6310d7cae 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -3,6 +3,8 @@ #define WEIGHT_MAX 500 #define WEIGHT_CHANGE_MIN 0 #define WEIGHT_CHANGE_MAX 100 +#define MAX_VOICE_FREQ 70000 +#define MIN_VOICE_FREQ 15000 // Define a place to save in character setup /datum/preferences @@ -12,6 +14,7 @@ var/weight_gain = 100 // Weight gain rate. var/weight_loss = 50 // Weight loss rate. var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. Default sharp. + var/voice_freq = 0 // Definition of the stuff for Sizing /datum/category_item/player_setup_item/vore/size @@ -24,6 +27,7 @@ S["weight_gain"] >> pref.weight_gain S["weight_loss"] >> pref.weight_loss S["fuzzy"] >> pref.fuzzy + S["voice_freq"] >> pref.voice_freq /datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S) S["size_multiplier"] << pref.size_multiplier @@ -31,12 +35,14 @@ S["weight_gain"] << pref.weight_gain S["weight_loss"] << pref.weight_loss S["fuzzy"] << pref.fuzzy + S["voice_freq"] << pref.voice_freq /datum/category_item/player_setup_item/vore/size/sanitize_character() pref.weight_vr = sanitize_integer(pref.weight_vr, WEIGHT_MIN, WEIGHT_MAX, initial(pref.weight_vr)) pref.weight_gain = sanitize_integer(pref.weight_gain, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_gain)) pref.weight_loss = sanitize_integer(pref.weight_loss, WEIGHT_CHANGE_MIN, WEIGHT_CHANGE_MAX, initial(pref.weight_loss)) pref.fuzzy = sanitize_integer(pref.fuzzy, 0, 1, initial(pref.fuzzy)) + pref.voice_freq = sanitize_integer(pref.voice_freq, 32000, 55000, initial(pref.fuzzy)) if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE) pref.size_multiplier = initial(pref.size_multiplier) @@ -45,12 +51,14 @@ character.weight_gain = pref.weight_gain character.weight_loss = pref.weight_loss character.fuzzy = pref.fuzzy + character.voice_freq = pref.voice_freq character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE) /datum/category_item/player_setup_item/vore/size/content(var/mob/user) . += "
" . += "Scale: [round(pref.size_multiplier*100)]%
" . += "Scaled Appearance: [pref.fuzzy ? "Fuzzy" : "Sharp"]
" + . += "Voice Frequency: [pref.voice_freq]
" . += "
" . += "Relative Weight: [pref.weight_vr]
" . += "Weight Gain Rate: [pref.weight_gain]
" @@ -104,4 +112,21 @@ pref.weight_loss = round(text2num(weight_loss_rate),1) return TOPIC_REFRESH + else if(href_list["voice_freq"]) + var/list/preset_voice_freqs = list("high" = MAX_VOICE_FREQ, "middle-high" = 56250, "middle" = 425000, "middle-low"= 28750, "low" = MIN_VOICE_FREQ, "custom" = 1, "random" = 0) + var/choice = tgui_input_list(usr, "What would you like to set your voice frequency to? ([MIN_VOICE_FREQ] - [MAX_VOICE_FREQ])", "Voice Frequency", preset_voice_freqs) + if(!choice) + return + choice = preset_voice_freqs[choice] + if(choice == 0) + else if(choice == 1) + choice = tgui_input_number(user, "Choose your character's voice frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Voice Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ) + if(choice > MAX_VOICE_FREQ) + choice = MAX_VOICE_FREQ + else if(choice < MIN_VOICE_FREQ) + choice = MIN_VOICE_FREQ + + pref.voice_freq = choice + return TOPIC_REFRESH + return ..(); diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index d928b39c2e..b6ba33682b 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -406,6 +406,32 @@ feedback_add_details("admin_verb","TRadioSounds") +/client/verb/toggle_say_sounds() + set name = "Toggle Say Sounds" + set category = "Preferences" + set desc = "Toggle hearing a sound when somebody speaks using say or whisper." + + var/pref_path = /datum/client_preference/say_sounds + toggle_preference(pref_path) + SScharacter_setup.queue_preferences_save(prefs) + + to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/say_sounds)) ? "hear" : "not hear"] say/whisper sounds.") + + feedback_add_details("admin_verb","TSaySounds") + +/client/verb/toggle_emote_sounds() + set name = "Toggle Me Sounds" + set category = "Preferences" + set desc = "Toggle hearing a sound when somebody speaks using me or subtle." + + var/pref_path = /datum/client_preference/emote_sounds + toggle_preference(pref_path) + SScharacter_setup.queue_preferences_save(prefs) + + to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/emote_sounds)) ? "hear" : "not hear"] me/subtle sounds.") + + feedback_add_details("admin_verb","TMeSounds") + // Not attached to a pref datum because those are strict binary toggles /client/verb/toggle_examine_mode() set name = "Toggle Examine Mode" diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 0a6a0793fb..a27f96e6a5 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -191,10 +191,20 @@ if(message) message = encode_html_emphasis(message) + var/ourfreq = null + if(isliving(src)) + var/mob/living/L = src + if(L.voice_freq > 0 ) + ourfreq = L.voice_freq + + // Hearing gasp and such every five seconds is not good emotes were not global for a reason. // Maybe some people are okay with that. var/turf/T = get_turf(src) + if(!T) return + playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/client_preference/emote_sounds) + var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE) var/list/m_viewers = in_range["mobs"] var/list/o_viewers = in_range["objs"] diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index 9689953ebb..9562cf103f 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -33,4 +33,21 @@ to_chat(usr, "OOC notes updated.") log_admin("[key_name(usr)] updated their OOC notes mid-round.") +/mob/living/verb/set_voice_freq() + set name = "Set Voice Frequency" + set desc = "Sets your voice frequency to be higher or lower pitched!" + set category = "OOC" + var/list/preset_voice_freqs = list("high" = MAX_VOICE_FREQ, "middle-high" = 56250, "middle" = 425000, "middle-low"= 28750, "low" = MIN_VOICE_FREQ, "custom" = 1, "random" = 0) + var/choice = tgui_input_list(src, "What would you like to set your voice frequency to?", "Voice Frequency", preset_voice_freqs) + if(!choice) + return + choice = preset_voice_freqs[choice] + if(choice == 0) + else if(choice == 1) + choice = tgui_input_number(src, "Choose your character's voice frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Voice Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ) + else if(choice > MAX_VOICE_FREQ) + choice = MAX_VOICE_FREQ + else if(choice < MIN_VOICE_FREQ) + choice = MIN_VOICE_FREQ + voice_freq = choice diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 848a05d56b..29d40472f9 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -252,8 +252,9 @@ var/list/channel_to_radio_key = new var/sound_vol = handle_v[2] //Default range and italics, may be overridden past here - var/message_range = world.view /////////////////////////////////THISSUN?????///////////////////////////////////// + var/message_range = world.view var/italics = 0 + var/do_sound = TRUE //Speaking into radios if(used_radios.len) @@ -297,6 +298,7 @@ var/list/channel_to_radio_key = new for(var/datum/multilingual_say_piece/S in message_pieces) if((S.speaking.flags & NONVERBAL) || (S.speaking.flags & INAUDIBLE)) custom_emote(1, "[pick(S.speaking.signlang_verb)].") + do_sound = FALSE //These will contain the main receivers of the message var/list/listening = list() @@ -368,7 +370,6 @@ var/list/channel_to_radio_key = new M << I1 if(whispering && !isobserver(M)) //Don't even bother with these unless whispering if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range - ////////////////////////DO WHISPER SOUNDS HERE ABOUTS//////////////////////////////////////////////////////// if(M.hear_say(stars_all(message_pieces), verb, italics, src, speech_sound, sound_vol*0.2)) if(M.client && !runechat_enabled) var/image/I2 = listening[M] || speech_bubble @@ -394,14 +395,21 @@ var/list/channel_to_radio_key = new C.images -= I qdel(I) + var/ourfreq = null + if(voice_freq > 0 ) + ourfreq = voice_freq //Log the message to file if(message_mode) message = "([message_mode == "headset" ? "Common" : capitalize(message_mode)]) [message]" //Adds radio keys used if available if(whispering) + if(do_sound) + playsound(T, pick(voice_sounds_list), 25, TRUE, extrarange = -6, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/client_preference/say_sounds) + log_whisper(message, src) else + if(do_sound) + playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/client_preference/say_sounds) log_say(message, src) - to_world("This is the sound_vol, [sound_vol]") return 1 /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/verb_understood="gestures", var/datum/language/language, var/type = 1) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 039c64e663..94595c9516 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -145,6 +145,7 @@ // Vorestation Edit: Meta Info for pAI if (client.prefs) ooc_notes = client.prefs.metadata + src << sound('sound/effects/pai_login.ogg', volume = 75) //VOREStation Add // this function shows the information about being silenced as a pAI in the Status panel /mob/living/silicon/pai/proc/show_silenced() diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index f10ce85b86..ffb127a23f 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -67,6 +67,7 @@ else spawn(0) M.show_message(message, 2) + M << sound('sound/talksounds/subtle_sound.ogg', volume = 25) for(var/obj/O as anything in vis_objs) spawn(0) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index d1435cbfbf..650446a939 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -31,6 +31,8 @@ var/absorbing_prey = 0 // Determines if the person is using the succubus drain or not. See station_special_abilities_vr. var/drain_finalized = 0 // Determines if the succubus drain will be KO'd/absorbed. Can be toggled on at any time. var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. + var/voice_freq = 0 // Preference for character voice frequency + var/voice_sounds_list = talk_sound // The sound list containing our voice sounds! var/permit_healbelly = TRUE var/stumble_vore = TRUE //Enabled by default since you have to enable drop pred/prey to do this anyway var/slip_vore = TRUE //Enabled by default since you have to enable drop pred/prey to do this anyway diff --git a/sound/effects/pai_login.ogg b/sound/effects/pai_login.ogg new file mode 100644 index 0000000000..b3aa132905 Binary files /dev/null and b/sound/effects/pai_login.ogg differ diff --git a/sound/talksounds/a.ogg b/sound/talksounds/a.ogg new file mode 100644 index 0000000000..5c9920eaff Binary files /dev/null and b/sound/talksounds/a.ogg differ diff --git a/sound/talksounds/b.ogg b/sound/talksounds/b.ogg new file mode 100644 index 0000000000..294af704dc Binary files /dev/null and b/sound/talksounds/b.ogg differ diff --git a/sound/talksounds/c.ogg b/sound/talksounds/c.ogg new file mode 100644 index 0000000000..54d1dce5b4 Binary files /dev/null and b/sound/talksounds/c.ogg differ diff --git a/sound/talksounds/d.ogg b/sound/talksounds/d.ogg new file mode 100644 index 0000000000..e82bd21a8b Binary files /dev/null and b/sound/talksounds/d.ogg differ diff --git a/sound/talksounds/e.ogg b/sound/talksounds/e.ogg new file mode 100644 index 0000000000..2637136bbb Binary files /dev/null and b/sound/talksounds/e.ogg differ diff --git a/sound/talksounds/f.ogg b/sound/talksounds/f.ogg new file mode 100644 index 0000000000..2a30912e27 Binary files /dev/null and b/sound/talksounds/f.ogg differ diff --git a/sound/talksounds/g.ogg b/sound/talksounds/g.ogg new file mode 100644 index 0000000000..5f61e4b39d Binary files /dev/null and b/sound/talksounds/g.ogg differ diff --git a/sound/talksounds/h.ogg b/sound/talksounds/h.ogg new file mode 100644 index 0000000000..9ed1f01341 Binary files /dev/null and b/sound/talksounds/h.ogg differ diff --git a/sound/talksounds/me_a.ogg b/sound/talksounds/me_a.ogg new file mode 100644 index 0000000000..8cb55c54f5 Binary files /dev/null and b/sound/talksounds/me_a.ogg differ diff --git a/sound/talksounds/me_b.ogg b/sound/talksounds/me_b.ogg new file mode 100644 index 0000000000..48e6b61d59 Binary files /dev/null and b/sound/talksounds/me_b.ogg differ diff --git a/sound/talksounds/me_c.ogg b/sound/talksounds/me_c.ogg new file mode 100644 index 0000000000..65476ee720 Binary files /dev/null and b/sound/talksounds/me_c.ogg differ diff --git a/sound/talksounds/me_d.ogg b/sound/talksounds/me_d.ogg new file mode 100644 index 0000000000..45d44bf2a1 Binary files /dev/null and b/sound/talksounds/me_d.ogg differ diff --git a/sound/talksounds/me_e.ogg b/sound/talksounds/me_e.ogg new file mode 100644 index 0000000000..d56c27d97d Binary files /dev/null and b/sound/talksounds/me_e.ogg differ diff --git a/sound/talksounds/me_f.ogg b/sound/talksounds/me_f.ogg new file mode 100644 index 0000000000..25e9754fec Binary files /dev/null and b/sound/talksounds/me_f.ogg differ diff --git a/sound/talksounds/subtle_sound.ogg b/sound/talksounds/subtle_sound.ogg new file mode 100644 index 0000000000..b8986f13fc Binary files /dev/null and b/sound/talksounds/subtle_sound.ogg differ