From dbacbfd0f4f1698774ff8700c10dc246c62069d8 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Sat, 28 Nov 2015 19:43:32 -0800 Subject: [PATCH] Gives deadchat the (f) follow link. I realllllllllly want to make this use M.Hear() rather then a istype check but it has a lot of args i don't understand how to implement. If you think it's worth it to fake a say call to Hear(), I'll take suggestions on how to implement that. (remember: all mob types have a potential to hear dead chat, as admins can always hear it, so we'd have to take into account all mob's overrides to Hear()) Side note: fixes admins not hearing deadchat while in lobby when enabled. --- code/modules/mob/say.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index ede338d56de..0dc269b0bdb 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -43,13 +43,17 @@ var/rendered = "DEAD: [name][alt_name] [message]" for(var/mob/M in player_list) - if(istype(M, /mob/new_player)) + var/adminoverride = 0 + if(M.client || M.client.holder || (M.client.prefs.chat_toggles & CHAT_DEAD)) + adminoverride = 1 + if(istype(M, /mob/new_player) && !adminoverride) continue - if(M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above - M << rendered //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not. - else if(M.stat == DEAD) - //M.show_message(rendered, 2) //Takes into account blindness and such. //preserved so you can look at it and cry at the stupidity of oldcoders. whoever coded this should be punched into the sun - M << rendered + if(M.stat != DEAD && !adminoverride) + continue + if(istype(M, /mob/dead/observer)) + M << "(F) [rendered]" + else + M << "[rendered]" /mob/proc/emote(var/act) return