From 68dd41276d9e02a56377367ff94f0a5b405c2be1 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 28 Feb 2023 08:02:38 +0100 Subject: [PATCH] Globalize the Voice list and fetching --- .../client/preference_setup/vore/02_size.dm | 7 +++ code/modules/mob/living/living_vr.dm | 4 +- code/modules/mob/living/login.dm | 30 +----------- modular_chomp/code/global.dm | 47 +++++++++++++++++++ .../code/modules/client/preferences.dm | 30 +----------- 5 files changed, 59 insertions(+), 59 deletions(-) diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index e741c385e3..f961b8df3c 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -68,8 +68,14 @@ character.offset_override = pref.offset_override //CHOMPEdit character.voice_freq = pref.voice_freq character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE) + + //CHOMPEDIT Global voice lookup if(!pref.voice_sound) character.voice_sounds_list = talk_sound + else + character.voice_sounds_list = get_talk_sound(pref.voice_sound) + /*if(!pref.voice_sound) + character.voice_sounds_list = talk_sound else switch(pref.voice_sound) if("beep-boop") @@ -100,6 +106,7 @@ character.voice_sounds_list = goon_speak_roach_sound if("goon speak skelly") character.voice_sounds_list = goon_speak_skelly_sound + */ //CHOMPEDIT Global voice lookup character.custom_speech_bubble = pref.custom_speech_bubble /datum/category_item/player_setup_item/vore/size/content(var/mob/user) diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index e4b639533c..b6cb182039 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -58,7 +58,8 @@ set desc = "Sets your voice style!" set category = "OOC" - var/list/possible_voice_types = list( + //CHOMPEDIT START, Global Talk Sounds + var/list/possible_voice_types = talk_sounds/*list( "beep-boop", "goon speak 1", "goon speak 2", @@ -73,6 +74,7 @@ "goon speak pugg", "goon speak roach", "goon speak skelly") + */ //CHOMPEDIT END, Global Talk Sounds var/choice = tgui_input_list(usr, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types) if(!choice) voice_sounds_list = talk_sound diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index e68d333cec..a4056b0d9b 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -35,35 +35,7 @@ if(!voice_sounds_list.len || !voice_sounds_list) if(client.prefs.voice_sound) var/prefsound = client.prefs.voice_sound - switch(prefsound) - if("beep-boop") - voice_sounds_list = talk_sound - if("goon speak 1") - voice_sounds_list = goon_speak_one_sound - if("goon speak 2") - voice_sounds_list = goon_speak_two_sound - if("goon speak 3") - voice_sounds_list = goon_speak_three_sound - if("goon speak 4") - voice_sounds_list = goon_speak_four_sound - if("goon speak blub") - voice_sounds_list = goon_speak_blub_sound - if("goon speak bottalk") - voice_sounds_list = goon_speak_bottalk_sound - if("goon speak buwoo") - voice_sounds_list = goon_speak_buwoo_sound - if("goon speak cow") - voice_sounds_list = goon_speak_cow_sound - if("goon speak lizard") - voice_sounds_list = goon_speak_lizard_sound - if("goon speak pug") - voice_sounds_list = goon_speak_pug_sound - if("goon speak pugg") - voice_sounds_list = goon_speak_pugg_sound - if("goon speak roach") - voice_sounds_list = goon_speak_roach_sound - if("goon speak skelly") - voice_sounds_list = goon_speak_skelly_sound + voice_sounds_list = get_talk_sound(prefsound) //CHOMEPEDIT GLobal voice getter else voice_sounds_list = talk_sound //VOREStation Add End diff --git a/modular_chomp/code/global.dm b/modular_chomp/code/global.dm index 3131ce21ff..540f0cc562 100644 --- a/modular_chomp/code/global.dm +++ b/modular_chomp/code/global.dm @@ -4,3 +4,50 @@ var/list/shell_module_blacklist = list( ) var/list/latejoin_gatewaystation = list() var/list/latejoin_plainspath = list() + +var/list/talk_sounds = list( + "beep-boop", + "goon speak 1", + "goon speak 2", + "goon speak 3", + "goon speak 4", + "goon speak blub", + "goon speak bottalk", + "goon speak buwoo", + "goon speak cow", + "goon speak lizard", + "goon speak pug", + "goon speak pugg", + "goon speak roach", + "goon speak skelly") + +proc/get_talk_sound(var/voice_sound) + switch(voice_sound) + if("beep-boop") + return talk_sound + if("goon speak 1") + return goon_speak_one_sound + if("goon speak 2") + return goon_speak_two_sound + if("goon speak 3") + return goon_speak_three_sound + if("goon speak 4") + return goon_speak_four_sound + if("goon speak blub") + return goon_speak_blub_sound + if("goon speak bottalk") + return goon_speak_bottalk_sound + if("goon speak buwoo") + return goon_speak_buwoo_sound + if("goon speak cow") + return goon_speak_cow_sound + if("goon speak lizard") + return goon_speak_lizard_sound + if("goon speak pug") + return goon_speak_pug_sound + if("goon speak pugg") + return goon_speak_pugg_sound + if("goon speak roach") + return goon_speak_roach_sound + if("goon speak skelly") + return goon_speak_skelly_sound diff --git a/modular_chomp/code/modules/client/preferences.dm b/modular_chomp/code/modules/client/preferences.dm index 135250340b..91f8d9146b 100644 --- a/modular_chomp/code/modules/client/preferences.dm +++ b/modular_chomp/code/modules/client/preferences.dm @@ -244,35 +244,7 @@ if(!voice_sound) character.voice_sounds_list = talk_sound else - switch(voice_sound) - if("beep-boop") - character.voice_sounds_list = talk_sound - if("goon speak 1") - character.voice_sounds_list = goon_speak_one_sound - if("goon speak 2") - character.voice_sounds_list = goon_speak_two_sound - if("goon speak 3") - character.voice_sounds_list = goon_speak_three_sound - if("goon speak 4") - character.voice_sounds_list = goon_speak_four_sound - if("goon speak blub") - character.voice_sounds_list = goon_speak_blub_sound - if("goon speak bottalk") - character.voice_sounds_list = goon_speak_bottalk_sound - if("goon speak buwoo") - character.voice_sounds_list = goon_speak_buwoo_sound - if("goon speak cow") - character.voice_sounds_list = goon_speak_cow_sound - if("goon speak lizard") - character.voice_sounds_list = goon_speak_lizard_sound - if("goon speak pug") - character.voice_sounds_list = goon_speak_pug_sound - if("goon speak pugg") - character.voice_sounds_list = goon_speak_pugg_sound - if("goon speak roach") - character.voice_sounds_list = goon_speak_roach_sound - if("goon speak skelly") - character.voice_sounds_list = goon_speak_skelly_sound + character.voice_sounds_list = get_talk_sound(voice_sound) character.species?.blood_color = blood_color