Skip to content

Commit

Permalink
Mind links won't highlight your own messages (#84625)
Browse files Browse the repository at this point in the history
## 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:
  • Loading branch information
Absolucy committed Jul 5, 2024
1 parent dcdd35b commit 574d603
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/datums/components/mind_linker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
return ..() && (owner.stat != DEAD)

/datum/action/innate/linked_speech/Activate()

var/datum/component/mind_linker/linker = target
var/mob/living/linker_parent = linker.parent

Expand All @@ -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)

0 comments on commit 574d603

Please sign in to comment.