From 2777e09e11534268cf1c8bf8425bf6f992284707 Mon Sep 17 00:00:00 2001 From: Aylong Date: Tue, 28 Nov 2023 12:34:49 +0200 Subject: [PATCH] Preferences lists --- .../client/preference/link_processing.dm | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 173651297b99..e9e736557b3a 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -319,8 +319,9 @@ if(S.autohiss_basic_map) var/list/autohiss_choice = list("Off" = AUTOHISS_OFF, "Basic" = AUTOHISS_BASIC, "Full" = AUTOHISS_FULL) var/new_autohiss_pref = tgui_input_list(user, "Choose your character's auto-accent level", "Character Preference", autohiss_choice) - if(new_autohiss_pref) - active_character.autohiss_mode = autohiss_choice[new_autohiss_pref] + if(!new_autohiss_pref) + return + active_character.autohiss_mode = autohiss_choice[new_autohiss_pref] if("metadata") var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , active_character.metadata) as message|null @@ -806,7 +807,7 @@ robolimb_companies[R.company] = R //List only main brands that have the parts we're looking for. R = new() //Re-initialize R. - choice = tgui_input_list(user, "Which manufacturer do you wish to use for this limb?", "Prosthesis", robolimb_companies) //Choose from a list of companies that offer the part the user wants. + choice = tgui_input_list(user, "Which manufacturer do you wish to use for this limb?", "[limb_name] - Prosthesis", robolimb_companies) //Choose from a list of companies that offer the part the user wants. if(!choice) return R.company = choice @@ -822,7 +823,7 @@ if(second_limb in L.parts) //If the child limb of the limb the user selected is also present in the model's parts list, state it's been found so the second limb can be set later. in_model = 1 if(robolimb_models.len > 1) //If there's more than one model in the list that can provide the part the user wants, let them choose. - subchoice = tgui_input_list(user, "Which model of [choice] [limb_name] do you wish to use?", "Prosthesis", robolimb_models) + subchoice = tgui_input_list(user, "Which model of [choice] [limb_name] do you wish to use?", "[limb_name] - Prosthesis - Model", robolimb_models) if(subchoice) choice = subchoice if(limb in list("head", "chest", "groin")) @@ -903,7 +904,9 @@ if("gender") if(!S.has_gender) - var/newgender = input(user, "Choose Gender:") as null|anything in list("Male", "Female", "Genderless") + var/newgender = tgui_input_list(user, "Who are you?", "Choose Gender", list("Male", "Female", "Genderless")) + if(!newgender) + return switch(newgender) if("Male") active_character.gender = MALE @@ -962,7 +965,9 @@ "19x15 (Ultrawide)" = "19x15" ) - var/new_range = input(user, "Select a view range") as anything in viewrange_options + var/new_range = tgui_input_list(user, "Select a view range", "View range", viewrange_options) + if(!new_range) + return var/actual_new_range = viewrange_options[new_range] viewrange = actual_new_range @@ -1096,7 +1101,10 @@ "High" = PARALLAX_HIGH, "Insane" = PARALLAX_INSANE ) - parallax = parallax_styles[input(user, "Pick a parallax style", "Parallax Style") as null|anything in parallax_styles] + var/new_parallax = tgui_input_list(user, "Pick a parallax style", "Parallax Style", parallax_styles) + if(!new_parallax) + return + parallax = parallax_styles[new_parallax] if(parent && parent.mob && parent.mob.hud_used) parent.mob.hud_used.update_parallax_pref()