]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fixes ghosts completely lacking speech (#22157)
authordeathride58 <deathride58@users.noreply.github.com>
Tue, 5 Dec 2023 21:40:03 +0000 (16:40 -0500)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 21:40:03 +0000 (14:40 -0700)
Content.Client/Chat/UI/SpeechBubble.cs
Resources/Locale/en-US/chat/managers/chat-manager.ftl

index 4c8b44999407175f5d2e23779ef8afa5cff99da0..9808ed1027fab458bcaa36181250768b234ac0be 100644 (file)
@@ -187,6 +187,8 @@ namespace Content.Client.Chat.UI
             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);
         }
index 0c817479a24cb9f7fc0cbcef3fc6a1f26e3f394b..9eeb39a0f0b7ec651a488dbbbd516dc0a2e201b5 100644 (file)
@@ -37,8 +37,8 @@ chat-manager-entity-looc-wrap-message = LOOC: [bold]{$entityName}:[/bold] {$mess
 chat-manager-send-ooc-wrap-message = OOC: [bold]{$playerName}:[/bold] {$message}
 chat-manager-send-ooc-patron-wrap-message = OOC: [bold][color={$patronColor}]{$playerName}[/color]:[/bold] {$message}
 
-chat-manager-send-dead-chat-wrap-message = {$deadChannelName}: [bold]{$playerName}:[/bold] {$message}
-chat-manager-send-admin-dead-chat-wrap-message = {$adminChannelName}: [bold]({$userName}):[/bold] {$message}
+chat-manager-send-dead-chat-wrap-message = {$deadChannelName}: [bold][BubbleHeader]{$playerName}[/BubbleHeader]:[/bold] [BubbleContent]{$message}[/BubbleContent]
+chat-manager-send-admin-dead-chat-wrap-message = {$adminChannelName}: [bold]([BubbleHeader]{$userName}[/BubbleHeader]):[/bold] [BubbleContent]{$message}[/BubbleContent]
 chat-manager-send-admin-chat-wrap-message = {$adminChannelName}: [bold]{$playerName}:[/bold] {$message}
 chat-manager-send-admin-announcement-wrap-message = [bold]{$adminChannelName}: {$message}[/bold]