Allows ghosts to see visible_messages. (#8806)

Allows ghosts to see visible_messages
This commit is contained in:
Matt Atlas
2020-05-08 12:57:40 +02:00
committed by GitHub
parent cc80a22bdd
commit 4cddf3c859
3 changed files with 46 additions and 3 deletions
@@ -907,11 +907,11 @@ mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
/mob/extra_ghost_link(var/atom/ghost)
if(client && eyeobj)
return "|<a href='byond://?src=\ref[ghost];track=\ref[eyeobj]'>\[E\]</a>"
return "|\[<a href='byond://?src=\ref[ghost];track=\ref[eyeobj]'>E</a>\]"
/mob/abstract/observer/extra_ghost_link(var/atom/ghost)
if(mind && mind.current)
return "|<a href='byond://?src=\ref[ghost];track=\ref[mind.current]'>\[B\]</a>"
return "|\[<a href='byond://?src=\ref[ghost];track=\ref[mind.current]'>B</a>\]"
/proc/ghost_follow_link(var/atom/target, var/atom/ghost)
if((!target) || (!ghost)) return
+3 -1
View File
@@ -124,11 +124,13 @@
continue
if (!M.client || istype(M, /mob/abstract/new_player))
continue
if(get_turf(M) in messageturfs)
if((get_turf(M) in messageturfs) || (isobserver(M) && (M.client.prefs.toggles & CHAT_GHOSTSIGHT)))
messagemobs += M
for(var/A in messagemobs)
var/mob/M = A
if(isobserver(M))
M.show_message("[ghost_follow_link(src, M)] [message]", 1)
if(self_message && M==src)
M.show_message(self_message, 1, blind_message, 2)
else if(M.see_invisible < invisibility) // Cannot view the invisible, but you can hear it.