mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Admin-only deadchat broadcasts don't repeat the "this is for admins only" message (#84212)
## About The Pull Request This makes it so that, when an admin-only deadchat broadcast is sent, it doesn't add the "this is for admins only" message for every admin in the server. ## Why It's Good For The Game I saw this and it annoyed me and we can do this in a better way. ## Changelog 🆑 Rhials fix: Admin-only deadchat broadcasts don't append a second "this message is for admins only" string for every admin online. /🆑
This commit is contained in:
@@ -331,6 +331,9 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
|
||||
/proc/deadchat_broadcast(message, source=null, mob/follow_target=null, turf/turf_target=null, speaker_key=null, message_type=DEADCHAT_REGULAR, admin_only=FALSE)
|
||||
message = span_deadsay("[source][span_linkify(message)]")
|
||||
|
||||
if(admin_only)
|
||||
message += span_deadsay(" (This is viewable to admins only).")
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
var/chat_toggles = TOGGLES_DEFAULT_CHAT
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
@@ -341,10 +344,8 @@ GLOBAL_LIST_INIT(skin_tone_names, list(
|
||||
toggles = prefs.toggles
|
||||
ignoring = prefs.ignoring
|
||||
if(admin_only)
|
||||
if (!M.client?.holder)
|
||||
return
|
||||
else
|
||||
message += span_deadsay(" (This is viewable to admins only).")
|
||||
if(!M.client?.holder)
|
||||
continue
|
||||
var/override = FALSE
|
||||
if(M.client?.holder && (chat_toggles & CHAT_DEAD))
|
||||
override = TRUE
|
||||
|
||||
Reference in New Issue
Block a user