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
@@ -155,7 +155,7 @@
for(var/mob/observer/dead/O in known_devices)
if(O.client && O.client.prefs.communicator_visibility == 1 && O.exonet)
communicators.Add(list(list(
"name" = sanitize("[O.client.prefs.real_name]'s communicator"),
"name" = sanitize("[O.client.prefs.read_preference(/datum/preference/name/real_name)]'s communicator"),
"address" = O.exonet.address,
"ref" = "\ref[O]"
)))
@@ -173,7 +173,7 @@
for(var/mob/observer/dead/O in voice_invites)
if(O.exonet && O.client)
invites.Add(list(list(
"name" = sanitize("[O.client.prefs.real_name]'s communicator"),
"name" = sanitize("[O.client.prefs.read_preference(/datum/preference/name/real_name)]'s communicator"),
"address" = O.exonet.address,
"ref" = "\ref[O]"
)))
@@ -191,7 +191,7 @@
for(var/mob/observer/dead/O in voice_requests)
if(O.exonet && O.client)
requests.Add(list(list(
"name" = sanitize("[O.client.prefs.real_name]'s communicator"),
"name" = sanitize("[O.client.prefs.read_preference(/datum/preference/name/real_name)]'s communicator"),
"address" = O.exonet.address,
"ref" = "\ref[O]"
)))
@@ -261,7 +261,7 @@
. = ..()
exonet = new(src)
if(client)
exonet.make_address("communicator-[src.client]-[src.client.prefs.real_name]")
exonet.make_address("communicator-[src.client]-[src.client.prefs.read_preference(/datum/preference/name/real_name)]")
else
exonet.make_address("communicator-[key]-[src.real_name]")
@@ -129,7 +129,7 @@
return //something is terribly wrong
for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling.
if(src.client.prefs.real_name == L.real_name)
if(src.client.prefs.read_preference(/datum/preference/name/real_name) == L.real_name)
to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first."))
return
@@ -286,7 +286,8 @@
if (usr != src)
return //something is terribly wrong
var/confirm = tgui_alert(src, "Would you like to talk as [src.client.prefs.real_name], over a communicator? This will reset your respawn timer, if someone answers.", "Join as Voice?", list("Yes","No"))
var/prefs_name = src.client.prefs.read_preference(/datum/preference/name/real_name)
var/confirm = tgui_alert(src, "Would you like to talk as [prefs_name], over a communicator? This will reset your respawn timer, if someone answers.", "Join as Voice?", list("Yes","No"))
if(confirm != "Yes")
return
@@ -295,7 +296,7 @@
return
for(var/mob/living/L in GLOB.mob_list) //Simple check so you don't have dead people calling.
if(src.client.prefs.real_name == L.real_name)
if(prefs_name == L.real_name)
to_chat(src, span_danger("Your identity is already present in the game world. Please load in a different character first."))
return