diff --git a/Content.Client/Chat/UI/SpeechBubble.cs b/Content.Client/Chat/UI/SpeechBubble.cs index 91e8e5a90f..82eccbcec8 100644 --- a/Content.Client/Chat/UI/SpeechBubble.cs +++ b/Content.Client/Chat/UI/SpeechBubble.cs @@ -182,20 +182,9 @@ namespace Content.Client.Chat.UI return msg; } - protected string ExtractSpeechSubstring(ChatMessage message, string tag) - { - var rawmsg = message.WrappedMessage; - var tagStart = rawmsg.IndexOf($"[{tag}]"); - var tagEnd = rawmsg.IndexOf($"[/{tag}]"); - if (tagStart < 0 || tagEnd < 0) //the above return -1 if the tag's not found, which in turn will cause the below to throw an exception. a blank speech bubble is far more noticeably broken than the bubble not appearing at all -bhijn - return ""; - tagStart += tag.Length + 2; - return rawmsg.Substring(tagStart, tagEnd - tagStart); - } - protected FormattedMessage ExtractAndFormatSpeechSubstring(ChatMessage message, string tag, Color? fontColor = null) { - return FormatSpeech(ExtractSpeechSubstring(message, tag), fontColor); + return FormatSpeech(SharedChatSystem.GetStringInsideTag(message, tag), fontColor); } } diff --git a/Content.Client/Options/UI/Tabs/MiscTab.xaml b/Content.Client/Options/UI/Tabs/MiscTab.xaml index db176db456..fc94ab7b0a 100644 --- a/Content.Client/Options/UI/Tabs/MiscTab.xaml +++ b/Content.Client/Options/UI/Tabs/MiscTab.xaml @@ -22,6 +22,7 @@ FontColorOverride="{xNamespace:Static s:StyleNano.NanoGold}" StyleClasses="LabelKeyText"/> +