mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 16:48:12 +01:00
Merge pull request #5808 from CHOMPStation2/upstream-merge-14564
[MIRROR] Allows speech bubbles to be selected in char setup and saved
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
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/custom_speech_bubble = "default"
|
||||
|
||||
// Definition of the stuff for Sizing
|
||||
/datum/category_item/player_setup_item/vore/size
|
||||
@@ -32,6 +33,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 +44,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 +57,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 +100,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,6 +109,7 @@
|
||||
. += "<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>"
|
||||
. += "<b>Custom Speech Bubble:</b> <a href='?src=\ref[src];customize_speech_bubble=1'>[pref.custom_speech_bubble]</a><br>"
|
||||
. += "<a href='?src=\ref[src];voice_test=1'><b>Test Selected Voice</b></a><br>" // CHOMPEdit: Enables testing voices
|
||||
. += "<br>"
|
||||
. += "<b>Relative Weight:</b> <a href='?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
|
||||
@@ -200,6 +207,14 @@
|
||||
pref.voice_sound = "goon speak 1" //CHOMPEdit - Defaults voice to a less jarring sound
|
||||
else
|
||||
pref.voice_sound = choice
|
||||
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
|
||||
// CHOMPEdit: Enable testing voice sounds
|
||||
else if(href_list["voice_test"])
|
||||
var/sound/S = pick(pref.voice_sound)
|
||||
|
||||
@@ -190,13 +190,4 @@
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
if (visible)
|
||||
visible_message("<b>\The [src]</b> shifts and contorts, taking the form of \a [new_species]!")
|
||||
regenerate_icons()
|
||||
|
||||
/mob/verb/select_speech_bubble()
|
||||
set name = "Select Speech Bubble"
|
||||
set category = "OOC"
|
||||
|
||||
var/new_speech_bubble = tgui_input_list(src, "Pick new voice!", "Character Preference", selectable_speech_bubbles)
|
||||
if(new_speech_bubble)
|
||||
to_chat(src, "<span class='notice'>Your voice changes.</span>")
|
||||
custom_speech_bubble = new_speech_bubble
|
||||
regenerate_icons()
|
||||
@@ -482,3 +482,11 @@
|
||||
continue
|
||||
to_chat(M, message)
|
||||
log_emote(message, src)
|
||||
|
||||
/mob/verb/select_speech_bubble()
|
||||
set name = "Select Speech Bubble"
|
||||
set category = "OOC"
|
||||
|
||||
var/new_speech_bubble = tgui_input_list(src, "Pick new voice (default for automatic selection)", "Character Preference", selectable_speech_bubbles)
|
||||
if(new_speech_bubble)
|
||||
custom_speech_bubble = new_speech_bubble
|
||||
|
||||
Reference in New Issue
Block a user