From 134a4bb6637e11bc990ca957f5014f0981e5bb3c Mon Sep 17 00:00:00 2001 From: Mieszko Je Date: Sun, 3 Oct 2021 18:17:53 +0200 Subject: [PATCH] stealthmin fix --- code/datums/mind.dm | 4 ++++ code/game/gamemodes/game_mode.dm | 4 ++-- code/modules/client/client_procs.dm | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 29a1b29de97..1fbb7a34f59 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -85,6 +85,10 @@ original = null return ..() +/datum/mind/proc/get_display_key() + var/clientKey = current?.client.get_display_key() + return clientKey ? clientKey : key + /datum/mind/proc/transfer_to(mob/living/new_character) var/datum/atom_hud/antag/hud_to_transfer = antag_hud //we need this because leave_hud() will clear this list var/mob/living/old_current = current diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 4e5372ffc2d..5aa81326c8e 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -451,7 +451,7 @@ var/jobtext = "" if(ply.assigned_role) jobtext = " the [ply.assigned_role]" - var/text = "[ply.key] was [ply.name][jobtext] and" + var/text = "[ply.get_display_key()] was [ply.name][jobtext] and" if(ply.current) if(ply.current.stat == DEAD) text += " died" @@ -468,7 +468,7 @@ return text /proc/printeventplayer(datum/mind/ply) - var/text = "[ply.key] was [ply.name]" + var/text = "[ply.get_display_key()] was [ply.name]" if(ply.special_role != SPECIAL_ROLE_EVENTMISC) text += " the [ply.special_role]" text += " and" diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 073e74caf26..03c5bd30749 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -202,6 +202,11 @@ ..() //redirect to hsrc.Topic() + +/client/proc/get_display_key() + var/fakekey = src?.holder?.fakekey + return fakekey ? fakekey : key + /client/proc/is_content_unlocked() if(!prefs.unlock_content) to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Click here to find out more.")