[MIRROR] Adds sanity checking to prefs checks, fixing a bug that can cause emotes to stop displaying intermittently [MDB IGNORE] (#23081)

* Adds sanity checking to prefs checks, fixing a bug that can cause emotes to stop displaying intermittently

* Update vox_procs.dm

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-15 01:40:51 +02:00
committed by GitHub
parent 2b205d167b
commit 2ac66a8a4a
15 changed files with 71 additions and 44 deletions

View File

@@ -615,10 +615,6 @@
var/ghost_message = span_game_say("[span_name("[sender]")] [rigged ? "(as [span_name(fake_name)]) Rigged " : ""]PDA Message --> [span_name("[signal.format_target()]")]: \"[signal.format_message()]\"")
var/list/ghosts = GLOB.dead_player_list + GLOB.current_observers_list
for(var/mob/player_mob as anything in ghosts)
if(player_mob.client && !player_mob.client?.prefs)
stack_trace("[player_mob] ([player_mob.ckey]) had null prefs, which shouldn't be possible!")
continue
if(isobserver(player_mob) && (player_mob.client?.prefs.chat_toggles & CHAT_GHOSTPDA))
to_chat(player_mob, "[FOLLOW_LINK(player_mob, sender)] [ghost_message]")