Conversion of realname and nickname from bay (#19120)

* Automatic changelog compile [ci skip]

* replace all bay instances for realname and nickname with tg

* add comments where uncertain of sanitisation needed

* Fix issue from git conflict..

* Fix issue causing setup menu not opening

* Attempt to clean up how name datums are handled

* Remove redundant check

* Fix number issues with character names

---------

Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com>
This commit is contained in:
Aura Dusklight
2026-02-08 18:34:04 +02:00
committed by GitHub
parent 8e057cf72b
commit 311c0117c1
33 changed files with 201 additions and 90 deletions
+2 -2
View File
@@ -81,7 +81,7 @@
/mob/living/proc/save_ooc_panel(mob/user)
if(user != src)
return
if(client.prefs.real_name != real_name)
if(client.prefs.read_preference(/datum/preference/name/real_name) != real_name)
to_chat(src, span_danger("Your selected character slot name is not the same as your character's name. Aborting save. Please select [real_name]'s character slot in character setup before saving."))
return
if(client.prefs.save_character())
@@ -186,7 +186,7 @@
/mob/living/proc/save_private_notes(mob/user)
if(user != src)
return
if(client.prefs.real_name != real_name)
if(client.prefs.read_preference(/datum/preference/name/real_name) != real_name)
to_chat(src, span_danger("Your selected character slot name is not the same as your character's name. Aborting save. Please select [real_name]'s character slot in character setup before saving."))
return
if(client.prefs.save_character())
+2 -2
View File
@@ -29,7 +29,7 @@
alpha = 127 //Maybe we'll have hologram calls later.
if(speaker.client && speaker.client.prefs)
var/datum/preferences/p = speaker.client.prefs
name = p.real_name
name = p.read_preference(/datum/preference/name/real_name)
real_name = name
gender = p.identifying_gender
@@ -81,7 +81,7 @@
set desc = "Changes your name."
set src = usr
var/new_name = sanitizeSafe(tgui_input_text(src, "Who would you like to be now?", "Communicator", src.client.prefs.real_name, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
var/new_name = sanitizeSafe(tgui_input_text(src, "Who would you like to be now?", "Communicator", src.client.prefs.read_preference(/datum/preference/name/real_name), MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(new_name)
if(comm)
comm.visible_message(span_notice("[icon2html(comm,viewers(comm))] [src.name] has left, and now you see [new_name]."))
+2 -2
View File
@@ -128,8 +128,8 @@
announce_ghost_joinleave(src)
if(client.prefs.read_preference(/datum/preference/toggle/human/name_is_always_random))
client.prefs.real_name = random_name(client.prefs.identifying_gender)
observer.real_name = client.prefs.real_name
client.prefs.update_preference_by_type(/datum/preference/name/real_name, random_name(client.prefs.identifying_gender))
observer.real_name = client.prefs.read_preference(/datum/preference/name/real_name)
observer.name = observer.real_name
if(!check_rights_for(client, R_HOLDER) && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
remove_verb(observer, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
+1 -1
View File
@@ -400,7 +400,7 @@
if(CONFIG_GET(flag/force_random_names))
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name(new_character.gender)
client.prefs.update_preference_by_type(/datum/preference/name/real_name, random_name(new_character.gender))
else
client.prefs.copy_to(new_character, icon_updates = TRUE)
+1 -1
View File
@@ -17,7 +17,7 @@
pass = FALSE
//Are they on the VERBOTEN LIST?
if (GLOB.prevent_respawns.Find(client?.prefs?.real_name))
if (GLOB.prevent_respawns.Find(client?.prefs?.read_preference(/datum/preference/name/real_name)))
to_chat(src,span_warning("You've already quit the round as this character. You can't go back now that you've free'd your job slot. Play another character, or wait for the next round."))
pass = FALSE