]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove user-excluding highlights from emotes while keeping (L)OOC support
authorvitopigno <vitopigno@gmail.com>
Sat, 21 Jun 2025 22:56:20 +0000 (00:56 +0200)
committervitopigno <vitopigno@gmail.com>
Sat, 21 Jun 2025 22:56:20 +0000 (00:56 +0200)
User-excluding highlights now get highlighted either when they're:
1. Present between double quotes;
2. Starting with LOOC/OOC
2. Having a newline before it.

This is due to CC, and Station announcements always having a newline before the actual message.

Content.Client/UserInterface/Systems/Chat/ChatUIController.Highlighting.cs

index dd73e3dd665784a6333c026aa4c97740e2c71f41..46e06865cf47006e190e02c56046be033966da12 100644 (file)
@@ -118,7 +118,7 @@ public sealed partial class ChatUIController : IOnSystemChanged<CharacterInfoSys
 
             // Make sure the character's name is highlighted only when mentioned directly (eg. it's said by someone),
             // for example in 'Name Surname says, "..."' 'Name Surname' won't be highlighted.
-            keyword = StartAtSign.Replace(keyword, @"(?<=(?<=,.*"".*)|(?<!\[Name].*))");
+            keyword = StartAtSign.Replace(keyword, @"(?<=(?<=^.?OOC:.*:.*)|(?<=,.*"".*)|(?<=\n.*))");
 
             _highlights.Add(keyword);
         }