From 87dc2be39b14cbcb966902aa1b9b0fa08cd03e35 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 5 Jul 2024 01:51:53 -0400 Subject: [PATCH] [PORT] Mind link speech displays symbols correctly (#2523) * Mind link speech displays symbols correctly (#76290) Closes #71991 Removes a call to sanitize() in mind linker code because tgui_input_text() already sanitizes input by default, symbols now display correctly * Mind links won't highlight your own messages (#84625) ## About The Pull Request Linked speech now prevents messages from highlighting if its a message you sent, or if you are the owner of said link. Also, linked speech messages are now marked as radio messages, for chat tab purposes. ## Why It's Good For The Game Because when you have your own name highlighted, it's annoying having every message with `[Shion Rosenthal's Slime Link]` highlighted, even if it's _my own_ message. ## Changelog :cl: qol: Linked speech now prevents messages from highlighting if its a message you sent, or if you are the owner of said link.. qol: Linked speech messages are now marked as radio messages, for chat tab purposes. /:cl: --------- Co-authored-by: cnleth <113535457+cnleth@users.noreply.github.com> --- code/datums/components/mind_linker.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/components/mind_linker.dm b/code/datums/components/mind_linker.dm index 23b13a652469..ab1b06501069 100644 --- a/code/datums/components/mind_linker.dm +++ b/code/datums/components/mind_linker.dm @@ -190,11 +190,10 @@ return ..() && (owner.stat != DEAD) /datum/action/innate/linked_speech/Activate() - var/datum/component/mind_linker/linker = target var/mob/living/linker_parent = linker.parent - var/message = sanitize(tgui_input_text(owner, "Enter a message to transmit.", "[linker.network_name] Telepathy")) + var/message = tgui_input_text(owner, "Enter a message to transmit.", "[linker.network_name] Telepathy") if(!message || QDELETED(src) || QDELETED(owner) || owner.stat == DEAD) return @@ -208,7 +207,8 @@ var/list/all_who_can_hear = assoc_to_keys(linker.linked_mobs) + linker_parent for(var/mob/living/recipient as anything in all_who_can_hear) - to_chat(recipient, formatted_message) + var/avoid_highlighting = (recipient == owner) || (recipient == linker_parent) + to_chat(recipient, formatted_message, type = MESSAGE_TYPE_RADIO, avoid_highlighting = avoid_highlighting) for(var/mob/recipient as anything in GLOB.dead_mob_list) - to_chat(recipient, "[FOLLOW_LINK(recipient, owner)] [formatted_message]") + to_chat(recipient, "[FOLLOW_LINK(recipient, owner)] [formatted_message]", type = MESSAGE_TYPE_RADIO)