From 2b1cab0bc571912f217b9d8981eaf33f89dee751 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 11 Mar 2021 07:50:15 +0100 Subject: [PATCH] [MIRROR] Allows Sentient Diseases to talk to ghostchat (#4055) * Allows Sentient Diseases to talk to ghostchat (#57391) * Allows Sentient Diseases to talk to ghostchat Co-authored-by: nianjiilical --- code/__DEFINES/is_helpers.dm | 2 ++ code/modules/antagonists/disease/disease_mob.dm | 12 ++++++++++++ interface/stylesheet.dm | 2 ++ 3 files changed, 16 insertions(+) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index a61e585b28f..155bf09592a 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -152,6 +152,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define isovermind(A) (istype(A, /mob/camera/blob)) +#define issentientdisease(A) (istype(A, /mob/camera/disease)) + #define iscameramob(A) (istype(A, /mob/camera)) #define isaicamera(A) (istype(A, /mob/camera/ai_eye)) diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index ea34adb9c1c..cae8cec3157 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -52,6 +52,8 @@ the new instance inside the host to be updated to the template's stats. /mob/camera/disease/Initialize(mapload) .= ..() + ADD_TRAIT(src, TRAIT_SIXTHSENSE, INNATE_TRAIT) //at least they'll have SOMEONE to talk to + disease_instances = list() hosts = list() @@ -108,6 +110,16 @@ the new instance inside the host to be updated to the template's stats. . += "[ability.name]" /mob/camera/disease/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) + if(!message) + return + log_talk(message, LOG_SAY) + var/rendered = "[src] says, \"[message]\"" + for(var/mob/listener in GLOB.mob_list) + if(issentientdisease(listener)) + to_chat(listener, rendered) + else if(isobserver(listener)) + var/link = FOLLOW_LINK(listener, src) + to_chat(listener, "[link] [rendered]") return /mob/camera/disease/Move(NewLoc, Dir = 0) diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm index c623139b570..ab36e825f6d 100644 --- a/interface/stylesheet.dm +++ b/interface/stylesheet.dm @@ -105,6 +105,8 @@ h1.alert, h2.alert {color: #000000;} .revenwarning {color: #760fbb; font-style: italic;} .revendanger {color: #760fbb; font-weight: bold; font-size: 3;} +.sentientdisease {color: #446600;} + .deconversion_message {color: #5000A0; font-size: 3; font-style: italic;} .ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;}