[MIRROR] Conversion of realname and nickname from bay (#12391)

Co-authored-by: Aura Dusklight <46622484+NovaDusklight@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-02-08 23:57:46 +01:00
committed by GitHub
co-authored by Aura Dusklight Kashargul
parent 1047b90c96
commit aacdd1a4f2
33 changed files with 204 additions and 89 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]"
)))
@@ -354,7 +354,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