mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 19:11:51 +00:00
Fixes communication being nearly impossible (except over radio) when there's a null client in the global player list (#70404)
This commit is contained in:
@@ -333,9 +333,13 @@
|
||||
|
||||
// Show it to ghosts
|
||||
var/ghost_message = span_name("[message_data["name"]] </span><span class='game say'>[rigged ? "Rigged" : ""] PDA Message</span> --> [span_name("[signal.format_target()]")]: <span class='message'>[signal.format_message()]")
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(isobserver(M) && (M.client?.prefs.chat_toggles & CHAT_GHOSTPDA))
|
||||
to_chat(M, "[FOLLOW_LINK(M, user)] [ghost_message]")
|
||||
for(var/mob/player_mob in GLOB.player_list)
|
||||
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, user)] [ghost_message]")
|
||||
|
||||
// Log in the talk log
|
||||
user.log_talk(message, LOG_PDA, tag="[rigged ? "Rigged" : ""] PDA: [message_data["name"]] to [signal.format_target()]")
|
||||
|
||||
Reference in New Issue
Block a user