From c1f0a659a0fe98a6fc80a32a553fb402213baeb0 Mon Sep 17 00:00:00 2001 From: Pandora Date: Thu, 5 Sep 2024 12:15:30 +0100 Subject: [PATCH 1/5] Update preferences.dm --- code/modules/client/preferences.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index dc67dcd57d..5622957c3d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -117,6 +117,7 @@ var/const/MAX_SAVE_SLOTS = 20 //character preferences var/real_name //our character's name + var/nickname //the nickname for the saveslot var/be_random_name = FALSE //whether we are a random name every round var/human_name_ban = FALSE @@ -327,6 +328,8 @@ var/const/MAX_SAVE_SLOTS = 20 dat += "

Name: " dat += "[real_name]" dat += "®

" + dat += "Slot nickame: " + dat += "[nickname ? "[nickname]" : "---"]
" dat += "Always Pick Random Name: [be_random_name ? "Yes" : "No"]
" dat += "Always Pick Random Appearance: [be_random_body ? "Yes" : "No"]

" @@ -1246,6 +1249,15 @@ var/const/MAX_SAVE_SLOTS = 20 else to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + if("nickname") + var/raw_name = input(user, "Choose a nickname or identifier for this character slot. This is not an in-character nickname:", "Character Preference") as text|null + if (raw_name) // Check to ensure that the user entered text (rather than cancel.) + var/new_name = reject_bad_name(raw_name) + if(new_name) + nickname = new_name + else + to_chat(user, "Invalid name. Your slot name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") + if("xeno_vision_level_pref") var/static/list/vision_level_choices = list(XENO_VISION_LEVEL_NO_NVG, XENO_VISION_LEVEL_MID_NVG, XENO_VISION_LEVEL_FULL_NVG) var/choice = tgui_input_list(user, "Choose your default xeno vision level", "Vision level", vision_level_choices, theme="hive_status") @@ -2224,10 +2236,11 @@ var/const/MAX_SAVE_SLOTS = 20 for(var/i=1, i<=MAX_SAVE_SLOTS, i++) S.cd = "/character[i]" S["real_name"] >> name + S["nickname"] >> nickname if(!name) name = "Character[i]" if(i==default_slot) name = "[name]" - dat += "[name]
" + dat += "[name] ([nickname])
" dat += "
" dat += "Close
" From 942d75139721be9a056dae0c974293a8cef345bc Mon Sep 17 00:00:00 2001 From: Pandora Date: Thu, 5 Sep 2024 12:16:33 +0100 Subject: [PATCH 2/5] Update preferences_savefile.dm --- code/modules/client/preferences_savefile.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4e6e166b2b..8ee9351130 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -514,6 +514,7 @@ //Character S["OOC_Notes"] >> metadata S["real_name"] >> real_name + S["nickname"] >> nickname S["name_is_always_random"] >> be_random_name S["body_is_always_random"] >> be_random_body S["gender"] >> gender @@ -673,6 +674,7 @@ //Character S["OOC_Notes"] << metadata S["real_name"] << real_name + S["nickname"] << nickname S["name_is_always_random"] << be_random_name S["body_is_always_random"] << be_random_body S["gender"] << gender From 6a5267780f078c560ac033ce66301bdc7dbba3a6 Mon Sep 17 00:00:00 2001 From: Pandora Date: Sat, 7 Sep 2024 18:00:27 +0100 Subject: [PATCH 3/5] Nickname -> Slot_label pt1 --- code/modules/client/preferences.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 5622957c3d..0ab8038ee0 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -117,7 +117,7 @@ var/const/MAX_SAVE_SLOTS = 20 //character preferences var/real_name //our character's name - var/nickname //the nickname for the saveslot + var/slot_label //the nickname for the saveslot var/be_random_name = FALSE //whether we are a random name every round var/human_name_ban = FALSE @@ -329,7 +329,7 @@ var/const/MAX_SAVE_SLOTS = 20 dat += "[real_name]" dat += "®" dat += "Slot nickame: " - dat += "[nickname ? "[nickname]" : "---"]
" + dat += "[slot_label ? "[slot_label]" : "---"]
" dat += "Always Pick Random Name: [be_random_name ? "Yes" : "No"]
" dat += "Always Pick Random Appearance: [be_random_body ? "Yes" : "No"]

" @@ -1249,12 +1249,12 @@ var/const/MAX_SAVE_SLOTS = 20 else to_chat(user, "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") - if("nickname") - var/raw_name = input(user, "Choose a nickname or identifier for this character slot. This is not an in-character nickname:", "Character Preference") as text|null + if("slot_label") + var/raw_name = input(user, "Choose a short label or identifier for this character slot. This is not an in-character nickname:", "Character Preference") as text|null if (raw_name) // Check to ensure that the user entered text (rather than cancel.) var/new_name = reject_bad_name(raw_name) if(new_name) - nickname = new_name + slot_label = new_name else to_chat(user, "Invalid name. Your slot name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .") @@ -2236,11 +2236,11 @@ var/const/MAX_SAVE_SLOTS = 20 for(var/i=1, i<=MAX_SAVE_SLOTS, i++) S.cd = "/character[i]" S["real_name"] >> name - S["nickname"] >> nickname + S["slot_label"] >> slot_label if(!name) name = "Character[i]" if(i==default_slot) name = "[name]" - dat += "[name] ([nickname])
" + dat += "[name] ([slot_label])
" dat += "
" dat += "Close
" From a4ff6c5fc168638c058d62901ab4daf973bf895a Mon Sep 17 00:00:00 2001 From: Pandora Date: Sat, 7 Sep 2024 18:01:26 +0100 Subject: [PATCH 4/5] nickname -> slot_label pt2 --- code/modules/client/preferences_savefile.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 8ee9351130..79b94d78b7 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -514,7 +514,7 @@ //Character S["OOC_Notes"] >> metadata S["real_name"] >> real_name - S["nickname"] >> nickname + S["slot_label"] >> slot_label S["name_is_always_random"] >> be_random_name S["body_is_always_random"] >> be_random_body S["gender"] >> gender @@ -674,7 +674,7 @@ //Character S["OOC_Notes"] << metadata S["real_name"] << real_name - S["nickname"] << nickname + S["slot_label"] << slot_label S["name_is_always_random"] << be_random_name S["body_is_always_random"] << be_random_body S["gender"] << gender From ca552064dc5effd011d5cec10b405b15b6439058 Mon Sep 17 00:00:00 2001 From: Pandora Date: Sat, 7 Sep 2024 18:03:25 +0100 Subject: [PATCH 5/5] Missed one --- code/modules/client/preferences.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0ab8038ee0..5b4ff3024a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -328,7 +328,7 @@ var/const/MAX_SAVE_SLOTS = 20 dat += "

Name: " dat += "[real_name]" dat += "®

" - dat += "Slot nickame: " + dat += "Slot label: " dat += "[slot_label ? "[slot_label]" : "---"]
" dat += "Always Pick Random Name: [be_random_name ? "Yes" : "No"]
" dat += "Always Pick Random Appearance: [be_random_body ? "Yes" : "No"]

"