mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Kitchen Sink P2 TGUI Prefs (#17579)
* Kitchen Sink V2 * tsx * Update vorestation.dme * Update 01_basic.dm * Update 01_basic.dm * Deletes the character directory * F & M tags * Flexible * Update misc.dm * ICP * more fixes * missing sounds
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
pref.voice_sound = save_data["voice_sound"]
|
||||
pref.custom_speech_bubble = save_data["custom_speech_bubble"]
|
||||
pref.custom_footstep = save_data["custom_footstep"]
|
||||
pref.species_sound = save_data["species_sound"]
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/save_character(list/save_data)
|
||||
save_data["size_multiplier"] = pref.size_multiplier
|
||||
@@ -45,6 +46,7 @@
|
||||
save_data["voice_sound"] = pref.voice_sound
|
||||
save_data["custom_speech_bubble"] = pref.custom_speech_bubble
|
||||
save_data["custom_footstep"] = pref.custom_footstep
|
||||
save_data["species_sound"] = pref.species_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))
|
||||
@@ -53,13 +55,16 @@
|
||||
pref.fuzzy = sanitize_integer(pref.fuzzy, 0, 1, initial(pref.fuzzy))
|
||||
pref.offset_override = sanitize_integer(pref.offset_override, 0, 1, initial(pref.offset_override))
|
||||
if(pref.voice_freq != 0)
|
||||
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.fuzzy))
|
||||
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq))
|
||||
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 GLOB.selectable_speech_bubbles))
|
||||
pref.custom_speech_bubble = "default"
|
||||
if(!(pref.custom_footstep))
|
||||
pref.custom_footstep = "Default"
|
||||
// var/datum/species/selected_species = GLOB.all_species[pref.species]
|
||||
if(!(pref.species_sound))
|
||||
pref.species_sound = "Unset"
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
character.weight = pref.weight_vr
|
||||
@@ -69,6 +74,7 @@
|
||||
character.offset_override = pref.offset_override
|
||||
character.voice_freq = pref.voice_freq
|
||||
character.resize(pref.size_multiplier, animate = FALSE, ignore_prefs = TRUE)
|
||||
|
||||
if(!pref.voice_sound)
|
||||
character.voice_sounds_list = GLOB.talk_sound
|
||||
else
|
||||
@@ -81,12 +87,23 @@
|
||||
. += span_bold("Scale:") + " <a href='byond://?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><br>"
|
||||
. += span_bold("Scaled Appearance:") + " <a [pref.fuzzy ? "" : ""] href='byond://?src=\ref[src];toggle_fuzzy=1'><b>[pref.fuzzy ? "Fuzzy" : "Sharp"]</b></a><br>"
|
||||
. += span_bold("Scaling Center:") + " <a [pref.offset_override ? "" : ""] href='byond://?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>"
|
||||
. += "<br>"
|
||||
. += span_bold("Mob Speech/Noise Customization") + ""
|
||||
. += "<br>"
|
||||
. += span_bold("Voice Frequency:") + " <a href='byond://?src=\ref[src];voice_freq=1'>[pref.voice_freq]</a><br>"
|
||||
. += span_bold("Voice Sounds:") + " <a href='byond://?src=\ref[src];voice_sounds_list=1'>[pref.voice_sound]</a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];voice_test=1'><b>Test Selected Voice</b></a><br>"
|
||||
. += span_bold("Custom Speech Bubble:") + " <a href='byond://?src=\ref[src];customize_speech_bubble=1'>[pref.custom_speech_bubble]</a><br>"
|
||||
. += span_bold("Custom Footstep Sounds:") + "<a href='byond://?src=\ref[src];customize_footsteps=1'>[pref.custom_footstep]</a><br>"
|
||||
. += "<br>"
|
||||
. += span_bold("Species Sounds:") + " <a href='byond://?src=\ref[src];species_sound_options=1'>[pref.species_sound]</a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];cough_test=1'><b>Test Cough Sounds</b></a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];sneeze_test=1'><b>Test Sneeze Sounds</b></a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];scream_test=1'><b>Test Scream Sounds</b></a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];pain_test=1'><b>Test Pain Sounds</b></a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];gasp_test=1'><b>Test Gasp Sounds</b></a><br>"
|
||||
. += "<a href='byond://?src=\ref[src];death_test=1'><b>Test Death Sounds</b></a><br>"
|
||||
. += "<br>"
|
||||
. += span_bold("Relative Weight:") + " <a href='byond://?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
|
||||
. += span_bold("Weight Gain Rate:") + " <a href='byond://?src=\ref[src];weight_gain=1'>[pref.weight_gain]</a><br>"
|
||||
. += span_bold("Weight Loss Rate:") + " <a href='byond://?src=\ref[src];weight_loss=1'>[pref.weight_loss]</a><br>"
|
||||
@@ -152,7 +169,7 @@
|
||||
return
|
||||
choice = preset_voice_freqs[choice]
|
||||
if(choice == 0)
|
||||
pref.voice_freq = choice
|
||||
pref.voice_freq = 42500
|
||||
return TOPIC_REFRESH
|
||||
else if(choice == 1)
|
||||
choice = tgui_input_number(user, "Choose your character's voice frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Voice Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ)
|
||||
@@ -178,10 +195,13 @@
|
||||
"goon speak pug",
|
||||
"goon speak pugg",
|
||||
"goon speak roach",
|
||||
"goon speak skelly")
|
||||
"goon speak skelly",
|
||||
"xeno speak")
|
||||
var/choice = tgui_input_list(user, "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"
|
||||
if(!pref.voice_sound)
|
||||
pref.voice_sound = "goon speak 1"
|
||||
else if(!choice)
|
||||
return TOPIC_REFRESH
|
||||
else
|
||||
pref.voice_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
@@ -231,11 +251,110 @@
|
||||
S = sound(pick(GLOB.goon_speak_roach_sound))
|
||||
if("goon speak skelly")
|
||||
S = sound(pick(GLOB.goon_speak_skelly_sound))
|
||||
if("xeno speak")
|
||||
S = sound(pick(GLOB.xeno_speak_sound))
|
||||
if(S)
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 50
|
||||
SEND_SOUND(user, S)
|
||||
|
||||
else if(href_list["species_sound_options"]) // You shouldn't be able to see this option if you don't have the option to select a custom icon base, so we don't need to re-check for safety here.
|
||||
var/list/possible_species_sound_types = species_sound_map
|
||||
var/choice = tgui_input_list(user, "Which set of sounds would you like to use for your character's species sounds? (Cough, Sneeze, Scream, Pain, Gasp, Death)", "Species Sounds", possible_species_sound_types)
|
||||
if(!choice)
|
||||
return TOPIC_REFRESH // No choice? Don't reset our selection
|
||||
else
|
||||
pref.species_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["cough_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["cough"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["cough"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have cough sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["sneeze_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["sneeze"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["sneeze"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have sneeze sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["scream_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["scream"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["scream"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have scream sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["pain_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["pain"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["pain"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have pain sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["gasp_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["gasp"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["gasp"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have gasp sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["death_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["death"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(pref))["death"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, span_warning("This set does not have death sounds!"))
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
return ..();
|
||||
|
||||
#undef WEIGHT_CHANGE_MIN
|
||||
|
||||
@@ -564,7 +564,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
for(var/T in pref.pos_traits + pref.neu_traits + pref.neg_traits)
|
||||
points_left -= GLOB.traits_costs[T]
|
||||
|
||||
var/traits_left = pref.max_traits - (pref.pos_traits.len + pref.neg_traits.len)
|
||||
var/traits_left = pref.max_traits - pref.pos_traits.len // CHOMPEdit: Only positive traits have a slot limit, to prevent broken builds
|
||||
|
||||
var/message = "Select a trait to learn more."
|
||||
if(mode != NEUTRAL_MODE)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
/datum/category_item/player_setup_item/vore/misc/load_character(list/save_data)
|
||||
pref.show_in_directory = save_data["show_in_directory"]
|
||||
pref.directory_tag = save_data["directory_tag"]
|
||||
pref.directory_gendertag = save_data["directory_gendertag"]
|
||||
pref.directory_sexualitytag = save_data["directory_sexualitytag"]
|
||||
pref.directory_erptag = save_data["directory_erptag"]
|
||||
pref.directory_ad = save_data["directory_ad"]
|
||||
pref.sensorpref = save_data["sensorpref"]
|
||||
@@ -15,6 +17,8 @@
|
||||
/datum/category_item/player_setup_item/vore/misc/save_character(list/save_data)
|
||||
save_data["show_in_directory"] = pref.show_in_directory
|
||||
save_data["directory_tag"] = pref.directory_tag
|
||||
save_data["directory_gendertag"] = pref.directory_gendertag
|
||||
save_data["directory_sexualitytag"] = pref.directory_sexualitytag
|
||||
save_data["directory_erptag"] = pref.directory_erptag
|
||||
save_data["directory_ad"] = pref.directory_ad
|
||||
save_data["sensorpref"] = pref.sensorpref
|
||||
@@ -33,6 +37,8 @@
|
||||
/datum/category_item/player_setup_item/vore/misc/sanitize_character()
|
||||
pref.show_in_directory = sanitize_integer(pref.show_in_directory, 0, 1, initial(pref.show_in_directory))
|
||||
pref.directory_tag = sanitize_inlist(pref.directory_tag, GLOB.char_directory_tags, initial(pref.directory_tag))
|
||||
pref.directory_gendertag = sanitize_inlist(pref.directory_gendertag, GLOB.char_directory_gendertags, initial(pref.directory_gendertag))
|
||||
pref.directory_sexualitytag = sanitize_inlist(pref.directory_sexualitytag, GLOB.char_directory_sexualitytags, initial(pref.directory_sexualitytag))
|
||||
pref.directory_erptag = sanitize_inlist(pref.directory_erptag, GLOB.char_directory_erptags, initial(pref.directory_erptag))
|
||||
pref.sensorpref = sanitize_integer(pref.sensorpref, 1, GLOB.sensorpreflist.len, initial(pref.sensorpref))
|
||||
pref.capture_crystal = sanitize_integer(pref.capture_crystal, 0, 1, initial(pref.capture_crystal))
|
||||
@@ -43,6 +49,8 @@
|
||||
. += "<br>"
|
||||
. += span_bold("Appear in Character Directory:") + " <a [pref.show_in_directory ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_show_in_directory=1'><b>[pref.show_in_directory ? "Yes" : "No"]</b></a><br>"
|
||||
. += span_bold("Character Directory Vore Tag:") + " <a href='byond://?src=\ref[src];directory_tag=1'><b>[pref.directory_tag]</b></a><br>"
|
||||
. += span_bold("Character Directory Gender:") + " <a href='byond://?src=\ref[src];directory_gendertag=1'><b>[pref.directory_gendertag]</b></a><br>"
|
||||
. += span_bold("Character Directory Sexuality:") + " <a href='byond://?src=\ref[src];directory_sexualitytag=1'><b>[pref.directory_sexualitytag]</b></a><br>"
|
||||
. += span_bold("Character Directory ERP Tag:") + " <a href='byond://?src=\ref[src];directory_erptag=1'><b>[pref.directory_erptag]</b></a><br>"
|
||||
. += span_bold("Character Directory Advertisement:") + " <a href='byond://?src=\ref[src];directory_ad=1'><b>Set Directory Ad</b></a><br>"
|
||||
. += span_bold("Suit Sensors Preference:") + " <a [pref.sensorpref ? "" : ""] href='byond://?src=\ref[src];toggle_sensor_setting=1'><b>[GLOB.sensorpreflist[pref.sensorpref]]</b></a><br>"
|
||||
@@ -62,6 +70,18 @@
|
||||
return
|
||||
pref.directory_tag = new_tag
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["directory_gendertag"])
|
||||
var/new_gendertag = tgui_input_list(user, "Pick a new Gender tag for the character directory. This is YOUR gender, not what you prefer.", "Character Gender Tag", GLOB.char_directory_gendertags, pref.directory_gendertag)
|
||||
if(!new_gendertag)
|
||||
return
|
||||
pref.directory_gendertag = new_gendertag
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["directory_sexualitytag"])
|
||||
var/new_sexualitytag = tgui_input_list(user, "Pick a new Sexuality/Orientation tag for the character directory", "Character Sexuality/Orientation Tag", GLOB.char_directory_sexualitytags, pref.directory_sexualitytag)
|
||||
if(!new_sexualitytag)
|
||||
return
|
||||
pref.directory_sexualitytag = new_sexualitytag
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["directory_erptag"])
|
||||
var/new_erptag = tgui_input_list(user, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags, pref.directory_erptag)
|
||||
if(!new_erptag)
|
||||
|
||||
Reference in New Issue
Block a user