From e26e3e821da2a67b5ca2c8a00f77c8edd0477909 Mon Sep 17 00:00:00 2001 From: Rykka Stormheart Date: Sun, 26 Feb 2023 03:52:24 -0800 Subject: [PATCH] Enables Testing Character Voices in Setup As title; This function was WIP, @blackmajor didn't have time to finish it. I went ahead and finished this up, and realized it was worth PR'ing separately for speedmerge, because this is MASSIVELY convenient. TL;DR: You can hit "Test Character Voice" in setup, to play a preview of what your voice will sound like with the selected type and frequency. See demonstration here: https://streamable.com/m6u9vc --- .../client/preference_setup/vore/02_size.dm | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 6e5bb0f6ba..1756ea6b62 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -103,7 +103,7 @@ . += "Scaling Center: [pref.offset_override ? "Odd" : "Even"]
" //CHOMPEdit . += "Voice Frequency: [pref.voice_freq]
" . += "Voice Sounds: [pref.voice_sound]
" -// . += "Test Voice:
" Maybe later + . += "Test Selected Voice
" // CHOMPEdit: Enables testing voices . += "
" . += "Relative Weight: [pref.weight_vr]
" . += "Weight Gain Rate: [pref.weight_gain]
" @@ -200,8 +200,40 @@ pref.voice_sound = "goon speak 1" //CHOMPEdit - Defaults voice to a less jarring sound else pref.voice_sound = choice - /* Maybe later + // CHOMPEdit: Enable testing voice sounds else if(href_list["voice_test"]) - SEND_SOUND(user, sound(pick(voice_sounds_list), 50, frequency = pref.voice_freq)) - */ + var/sound/S = pick(pref.voice_sound) + switch(pref.voice_sound) + if("beep-boop") + S = sound(pick(talk_sound)) + if("goon speak 1") + S = sound(pick(goon_speak_one_sound)) + if("goon speak 2") + S = sound(pick(goon_speak_two_sound)) + if("goon speak 3") + S = sound(pick(goon_speak_three_sound)) + if("goon speak 4") + S = sound(pick(goon_speak_four_sound)) + if("goon speak blub") + S = sound(pick(goon_speak_blub_sound)) + if("goon speak bottalk") + S = sound(pick(goon_speak_bottalk_sound)) + if("goon speak buwoo") + S = sound(pick(goon_speak_buwoo_sound)) + if("goon speak cow") + S = sound(pick(goon_speak_cow_sound)) + if("goon speak lizard") + S = sound(pick(goon_speak_lizard_sound)) + if("goon speak pug") + S = sound(pick(goon_speak_pug_sound)) + if("goon speak pugg") + S = sound(pick(goon_speak_pugg_sound)) + if("goon speak roach") + S = sound(pick(goon_speak_roach_sound)) + if("goon speak skelly") + S = sound(pick(goon_speak_skelly_sound)) + S.frequency = pick(pref.voice_freq) + S.volume = 50 + SEND_SOUND(user, S) + // CHOMPEdit End return ..();