Skip to content

Commit

Permalink
Nickname -> Slot_label pt1
Browse files Browse the repository at this point in the history
  • Loading branch information
BonniePandora authored Sep 7, 2024
1 parent 942d751 commit 6a52677
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -329,7 +329,7 @@ var/const/MAX_SAVE_SLOTS = 20
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a>"
dat += "<a href='?_src_=prefs;preference=name;task=random'>&reg</A></h1>"
dat += "<u><b>Slot nickame:</b></u> "
dat += "<a href='?_src_=prefs;preference=nickname;task=input'><b>[nickname ? "[nickname]" : "---"]</b></a><br> "
dat += "<a href='?_src_=prefs;preference=slot_label;task=input'><b>[slot_label ? "[slot_label]" : "---"]</b></a><br> "
dat += "<b>Always Pick Random Name:</b> <a href='?_src_=prefs;preference=rand_name'><b>[be_random_name ? "Yes" : "No"]</b></a><br>"
dat += "<b>Always Pick Random Appearance:</b> <a href='?_src_=prefs;preference=rand_body'><b>[be_random_body ? "Yes" : "No"]</b></a><br><br>"

Expand Down Expand Up @@ -1249,12 +1249,12 @@ var/const/MAX_SAVE_SLOTS = 20
else
to_chat(user, "<font color='red'>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 .</font>")

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, "<font color='red'>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 .</font>")

Expand Down Expand Up @@ -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 = "<b>[name]</b>"
dat += "<a href='?_src_=prefs;preference=changeslot;num=[i];'>[name] ([nickname])</a><br>"
dat += "<a href='?_src_=prefs;preference=changeslot;num=[i];'>[name] ([slot_label])</a><br>"

dat += "<hr>"
dat += "<a href='byond://?src=\ref[user];preference=close_load_dialog'>Close</a><br>"
Expand Down

0 comments on commit 6a52677

Please sign in to comment.