Allows speech bubbles to be selected in char setup and saved

This commit is contained in:
Casey
2023-02-26 18:10:11 +00:00
committed by CHOMPStation2
parent e10ac1d783
commit 3c878714b8
3 changed files with 36 additions and 10 deletions
@@ -14,9 +14,15 @@
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.
<<<<<<< HEAD
var/offset_override = FALSE //CHOMPEdit
var/voice_freq = 42500 //CHOMPEdit - Why was the default 0
var/voice_sound = "goon speak 1" //CHOMPEdit - Changed the default voice to one less jarring
=======
var/voice_freq = 0
var/voice_sound = "beep-boop"
var/custom_speech_bubble = "default"
>>>>>>> ed8dcd12d7... Merge pull request #14564 from Heroman3003/protean
// Definition of the stuff for Sizing
/datum/category_item/player_setup_item/vore/size
@@ -32,6 +38,7 @@
S["offset_override"] >> pref.offset_override //CHOMPEdit
S["voice_freq"] >> pref.voice_freq
S["voice_sound"] >> pref.voice_sound
S["custom_speech_bubble"] >> pref.custom_speech_bubble
/datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S)
S["size_multiplier"] << pref.size_multiplier
@@ -42,6 +49,7 @@
S["offset_override"] << pref.offset_override //CHOMPEdit
S["voice_freq"] << pref.voice_freq
S["voice_sound"] << pref.voice_sound
S["custom_speech_bubble"] << pref.custom_speech_bubble
/datum/category_item/player_setup_item/vore/size/sanitize_character()
@@ -54,6 +62,8 @@
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, 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)
if(!(pref.custom_speech_bubble in selectable_speech_bubbles))
pref.custom_speech_bubble = "default"
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
character.weight = pref.weight_vr
@@ -95,6 +105,7 @@
character.voice_sounds_list = goon_speak_roach_sound
if("goon speak skelly")
character.voice_sounds_list = goon_speak_skelly_sound
character.custom_speech_bubble = pref.custom_speech_bubble
/datum/category_item/player_setup_item/vore/size/content(var/mob/user)
. += "<br>"
@@ -103,7 +114,11 @@
. += "<b>Scaling Center:</b> <a [pref.offset_override ? "" : ""] href='?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>" //CHOMPEdit
. += "<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_sound]</a><br>"
<<<<<<< HEAD
. += "<a href='?src=\ref[src];voice_test=1'><b>Test Selected Voice</b></a><br>" // CHOMPEdit: Enables testing voices
=======
. += "<b>Custom Speech Bubble:</b> <a href='?src=\ref[src];customize_speech_bubble=1'>[pref.custom_speech_bubble]</a><br>"
>>>>>>> ed8dcd12d7... Merge pull request #14564 from Heroman3003/protean
. += "<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>"
@@ -200,6 +215,7 @@
pref.voice_sound = "goon speak 1" //CHOMPEdit - Defaults voice to a less jarring sound
else
pref.voice_sound = choice
<<<<<<< HEAD
// CHOMPEdit: Enable testing voice sounds
else if(href_list["voice_test"])
var/sound/S = pick(pref.voice_sound)
@@ -236,4 +252,15 @@
S.volume = 50
SEND_SOUND(user, S)
// CHOMPEdit End
=======
return TOPIC_REFRESH
else if(href_list["customize_speech_bubble"])
var/choice = tgui_input_list(usr, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", selectable_speech_bubbles)
if(!choice)
pref.custom_speech_bubble = "default"
else
pref.custom_speech_bubble = choice
return TOPIC_REFRESH
>>>>>>> ed8dcd12d7... Merge pull request #14564 from Heroman3003/protean
return ..();