From a50dc5084902eda7f6c215d458694a01903aa993 Mon Sep 17 00:00:00 2001 From: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> Date: Sun, 7 Apr 2024 17:02:10 -0400 Subject: [PATCH] [S] Fixes an oversight for a different exploit fix (#25041) * Moves it up to where it should be * Put the first part back --- code/datums/emote.dm | 5 +++++ code/modules/mob/living/brain/brain_emote.dm | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/datums/emote.dm b/code/datums/emote.dm index 23e3ca9850a..e549d8b1314 100644 --- a/code/datums/emote.dm +++ b/code/datums/emote.dm @@ -521,6 +521,11 @@ var/mob/living/sender = user if(HAS_TRAIT(sender, TRAIT_EMOTE_MUTE) && intentional) return FALSE + if(isbrain(sender)) + var/mob/living/brain/B = user + if(istype(B.container, /obj/item/mmi/robotic_brain)) //Robobrains can't be silenced and still emote + var/obj/item/mmi/robotic_brain/robobrain = B.container + return !robobrain.silenced else // deadchat handling if(check_mute(user.client?.ckey, MUTE_DEADCHAT)) diff --git a/code/modules/mob/living/brain/brain_emote.dm b/code/modules/mob/living/brain/brain_emote.dm index 861e1706a59..68e61de98ef 100644 --- a/code/modules/mob/living/brain/brain_emote.dm +++ b/code/modules/mob/living/brain/brain_emote.dm @@ -14,6 +14,7 @@ if(self_message) to_chat(user, self_message) +// So, brains can't really see their own emotes so we'll probably just want to send an extra message /datum/emote/living/brain/can_run_emote(mob/user, status_check, intentional) . = ..() @@ -25,12 +26,6 @@ if(!(B.container && istype(B.container, /obj/item/mmi))) // No MMI, no emotes return FALSE - if(istype(B.container, /obj/item/mmi/robotic_brain)) //Robobrains can't be silenced and still emote - var/obj/item/mmi/robotic_brain/robobrain = B.container - return !robobrain.silenced - -// So, brains can't really see their own emotes so we'll probably just want to send an extra message - /datum/emote/living/brain/alarm key = "alarm" key_third_person = "alarms"