Voice types!

Ports voices from goon and makes them selectable in addition to the one I made!

Also renames the various verbs to `Sound Toggle:` followed by the type they do, so they'll be together in the preferences tab
This commit is contained in:
VerySoft
2022-07-16 02:26:51 -04:00
parent f025598a04
commit a38c607809
49 changed files with 165 additions and 23 deletions
@@ -15,7 +15,7 @@
var/weight_loss = 50 // Weight loss rate.
var/fuzzy = 0 // Preference toggle for sharp/fuzzy icon. Default sharp.
var/voice_freq = 0
var/voice_sounds_list
var/voice_sound = "beep-boop"
// Definition of the stuff for Sizing
/datum/category_item/player_setup_item/vore/size
@@ -29,7 +29,7 @@
S["weight_loss"] >> pref.weight_loss
S["fuzzy"] >> pref.fuzzy
S["voice_freq"] >> pref.voice_freq
S["voice_sounds_list"] >> pref.voice_sounds_list
S["voice_sound"] >> pref.voice_sound
/datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S)
S["size_multiplier"] << pref.size_multiplier
@@ -38,7 +38,7 @@
S["weight_loss"] << pref.weight_loss
S["fuzzy"] << pref.fuzzy
S["voice_freq"] << pref.voice_freq
S["voice_sounds_list"] << pref.voice_sounds_list
S["voice_sound"] << pref.voice_sound
/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))
@@ -57,19 +57,45 @@
character.fuzzy = pref.fuzzy
character.voice_freq = pref.voice_freq
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
switch(pref.voice_sounds_list)
if("beep-boop")
character.voice_sounds_list = pref.voice_sounds_list
else
character.voice_sounds_list = talk_sound
if(!pref.voice_sound)
character.voice_sounds_list = talk_sound
else
switch(pref.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
/datum/category_item/player_setup_item/vore/size/content(var/mob/user)
. += "<br>"
. += "<b>Scale:</b> <a href='?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><br>"
. += "<b>Scaled Appearance:</b> <a [pref.fuzzy ? "" : ""] href='?src=\ref[src];toggle_fuzzy=1'><b>[pref.fuzzy ? "Fuzzy" : "Sharp"]</b></a><br>"
. += "<b>Voice Frequency:</b> <a href='?src=\ref[src];voice_freq=1'>[pref.voice_freq]</a><br>"
// . += "<b>Voice Sounds:</b> <a href='?src=\ref[src];voice_sounds_list=1'>[pref.voice_sounds_list]</a><br>" //Maybe later when there's more options
. += "<b>Voice Sounds:</b> <a href='?src=\ref[src];voice_sounds_list=1'>[pref.voice_sound]</a><br>"
. += "<br>"
. += "<b>Relative Weight:</b> <a href='?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
. += "<b>Weight Gain Rate:</b> <a href='?src=\ref[src];weight_gain=1'>[pref.weight_gain]</a><br>"
@@ -124,7 +150,7 @@
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/list/preset_voice_freqs = list("high" = MAX_VOICE_FREQ, "middle-high" = 56250, "middle" = 42500, "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
@@ -142,7 +168,25 @@
pref.voice_freq = choice
return TOPIC_REFRESH
else if(href_list["voice_sounds_list"])
var/choice = tgui_alert(usr, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", list("beep-boop"))
if(choice)
pref.voice_sounds_list = choice
var/list/possible_voice_types = 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/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)
pref.voice_sound = "beep-boop"
else
pref.voice_sound = choice
return ..();