diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index dc67dcd57d..5b4ff3024a 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/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 @@ -327,6 +328,8 @@ var/const/MAX_SAVE_SLOTS = 20 dat += "

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

" + 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"]

" @@ -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("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) + 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 .") + 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["slot_label"] >> slot_label if(!name) name = "Character[i]" if(i==default_slot) name = "[name]" - dat += "[name]
" + dat += "[name] ([slot_label])
" dat += "
" dat += "Close
" diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4e6e166b2b..79b94d78b7 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["slot_label"] >> slot_label 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["slot_label"] << slot_label S["name_is_always_random"] << be_random_name S["body_is_always_random"] << be_random_body S["gender"] << gender