From 66ba2758f33cc2b948266937b83f3480ecfe40aa Mon Sep 17 00:00:00 2001 From: Dragonkiller93 <82484852+Dragonkiller93@users.noreply.github.com> Date: Thu, 29 Apr 2021 04:47:43 -0700 Subject: [PATCH] Borer preference affects notification (#15948) * Borer preference affects notification * Update code/game/gamemodes/miniantags/borer/borer.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> * Update code/modules/mob/mob_helpers.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> * Update code/modules/mob/mob_helpers.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> * Fix ambiguous or operator Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/gamemodes/miniantags/borer/borer.dm | 2 +- code/modules/mob/mob_helpers.dm | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index a0dcd826972..d5de0f42f29 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -119,7 +119,7 @@ remove_from_all_data_huds() generation = gen add_language("Cortical Link") - notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) + notify_ghosts("A cortical borer has been created in [get_area(src)]!", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK, role = ROLE_BORER) real_name = "Cortical Borer [rand(1000,9999)]" truename = "[borer_names[min(generation, borer_names.len)]] [rand(1000,9999)]" GrantBorerActions() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 24b87e836fa..146f5562c54 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -478,9 +478,9 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM lname = "[lname] " to_chat(M, "[lname][follow][message]") -/proc/notify_ghosts(message, ghost_sound = null, enter_link = null, title = null, atom/source = null, image/alert_overlay = null, flashwindow = TRUE, action = NOTIFY_JUMP) //Easy notification of ghosts. +/proc/notify_ghosts(message, ghost_sound = null, enter_link = null, title = null, atom/source = null, image/alert_overlay = null, flashwindow = TRUE, action = NOTIFY_JUMP, role = null) //Easy notification of ghosts. for(var/mob/dead/observer/O in GLOB.player_list) - if(O.client) + if(O.client && (!role || (role in O.client.prefs.be_special))) to_chat(O, "[message][(enter_link) ? " [enter_link]" : ""]") if(ghost_sound) O << sound(ghost_sound) @@ -670,4 +670,3 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.") return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well return TRUE -