From 2faf0348f19116664556775d1294dedd43daef19 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Sat, 11 Sep 2021 19:49:45 -0500 Subject: [PATCH 1/2] Stops adding 'Random' to the list of bars, also makes the cancel button not change preference, rather than clear it --- code/modules/client/preferences.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e184bf96a7e5..e5349ee0c5f5 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1754,8 +1754,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) map = !map if("bar_choice") var/list/selectablebars = GLOB.potential_box_bars - selectablebars += "Random" - var/pickedbar = input(user, "Choose your bar.", "Character Preference", bar_choice) as null|anything in GLOB.potential_box_bars + var/pickedbar = input(user, "Choose your bar.", "Character Preference", bar_choice) as null|anything in GLOB.potential_box_bars|"Random" + if(!pickedbar) + return bar_choice = pickedbar if ("max_chat_length") var/desiredlength = input(user, "Choose the max character length of shown Runechat messages. Valid range is 1 to [CHAT_MESSAGE_MAX_LENGTH] (default: [initial(max_chat_length)]))", "Character Preference", max_chat_length) as null|num From b207da2f322b14a5fd65da2a3e51391d9d43066e Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Sat, 11 Sep 2021 20:17:04 -0500 Subject: [PATCH 2/2] Makes it actually compile --- code/modules/client/preferences.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e5349ee0c5f5..b9272a1b20d8 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1753,8 +1753,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("map") map = !map if("bar_choice") - var/list/selectablebars = GLOB.potential_box_bars - var/pickedbar = input(user, "Choose your bar.", "Character Preference", bar_choice) as null|anything in GLOB.potential_box_bars|"Random" + var/pickedbar = input(user, "Choose your bar.", "Character Preference", bar_choice) as null|anything in (GLOB.potential_box_bars|"Random") if(!pickedbar) return bar_choice = pickedbar