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 1/6] 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 From 9c739fa94cc48680a66460f23ab1b49793edcda8 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 28 Feb 2023 08:29:48 +0100 Subject: [PATCH 2/6] Make the list more sane --- modular_chomp/code/global.dm | 45 +++++++++++++----------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/modular_chomp/code/global.dm b/modular_chomp/code/global.dm index 540f0cc562..6a60c4f88d 100644 --- a/modular_chomp/code/global.dm +++ b/modular_chomp/code/global.dm @@ -20,34 +20,21 @@ var/list/talk_sounds = list( "goon speak pugg", "goon speak roach", "goon speak skelly") +var/list/talk_sound_map = list( + "beep-boop" = talk_sound, + "goon speak 1" = goon_speak_one_sound, + "goon speak 2" = goon_speak_two_sound, + "goon speak 3"=goon_speak_three_sound, + "goon speak 4"=goon_speak_four_sound, + "goon speak blub"=goon_speak_blub_sound, + "goon speak bottalk"=goon_speak_bottalk_sound, + "goon speak buwoo"=goon_speak_buwoo_sound, + "goon speak cow"=goon_speak_cow_sound, + "goon speak lizard"=goon_speak_lizard_sound, + "goon speak pug"=goon_speak_pug_sound, + "goon speak pugg"=goon_speak_pugg_sound, + "goon speak roach"=goon_speak_roach_sound, + "goon speak skelly"=goon_speak_skelly_sound,) 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 + return talk_sound_map[voice_sound] From f300ea8afce23fe9e6e6faa661f36461d562b9b9 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:41:18 +0100 Subject: [PATCH 3/6] Even saner lists --- modular_chomp/code/global.dm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/modular_chomp/code/global.dm b/modular_chomp/code/global.dm index 6a60c4f88d..5bc5615a06 100644 --- a/modular_chomp/code/global.dm +++ b/modular_chomp/code/global.dm @@ -5,21 +5,8 @@ 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") +var/list/talk_sounds = list() + var/list/talk_sound_map = list( "beep-boop" = talk_sound, "goon speak 1" = goon_speak_one_sound, @@ -36,5 +23,10 @@ var/list/talk_sound_map = list( "goon speak roach"=goon_speak_roach_sound, "goon speak skelly"=goon_speak_skelly_sound,) +/hook/startup/proc/Init_talk_sounds() + for(var/i in talk_sound_map) + talk_sounds |= talk_sound_map[i] //Thank you BM absolute legend + return 1 + proc/get_talk_sound(var/voice_sound) return talk_sound_map[voice_sound] From 71f006d5c6859dca5c50c6443c35c930117bfe44 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 2 Mar 2023 06:25:42 +0100 Subject: [PATCH 4/6] Update login.dm --- code/modules/mob/living/login.dm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index a4056b0d9b..e89a54cc6a 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -36,6 +36,37 @@ if(client.prefs.voice_sound) var/prefsound = client.prefs.voice_sound voice_sounds_list = get_talk_sound(prefsound) //CHOMEPEDIT GLobal voice getter + /* CHOMPRemval, redundant voice selector + 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 + */CHOMPRemval, redundant voice selector else voice_sounds_list = talk_sound //VOREStation Add End From 777c0ca05c6b6df7c9c363b30d217197d0861570 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 2 Mar 2023 08:21:59 +0100 Subject: [PATCH 5/6] Ooop uncommented comment --- code/modules/mob/living/login.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index e89a54cc6a..55a0f5700f 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -66,7 +66,7 @@ voice_sounds_list = goon_speak_roach_sound if("goon speak skelly") voice_sounds_list = goon_speak_skelly_sound - */CHOMPRemval, redundant voice selector + */ //CHOMPRemval, redundant voice selector else voice_sounds_list = talk_sound //VOREStation Add End From 476af4b90b52f9de2eedeba229996bfb929ffc85 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Fri, 3 Mar 2023 01:08:48 +0100 Subject: [PATCH 6/6] Update preferences.dm --- .../code/modules/client/preferences.dm | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/modular_chomp/code/modules/client/preferences.dm b/modular_chomp/code/modules/client/preferences.dm index 91f8d9146b..24b0e35cf9 100644 --- a/modular_chomp/code/modules/client/preferences.dm +++ b/modular_chomp/code/modules/client/preferences.dm @@ -244,6 +244,37 @@ if(!voice_sound) character.voice_sounds_list = talk_sound else + /* CHOMPREMOVAL, redundant list + 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 + */ //CHOMPREMOVAL, redundant list character.voice_sounds_list = get_talk_sound(voice_sound) character.species?.blood_color = blood_color