From 8a90e5d186381905935ec1e0a138db4998f0bbf1 Mon Sep 17 00:00:00 2001 From: "L.E.D" <10257081+unusualcrow@users.noreply.github.com> Date: Thu, 28 Nov 2019 08:38:23 -0500 Subject: [PATCH] Eliminate unnecessary whitespace in examine (#479) * eliminate unnecessary whitespace in examine * oops --- .../GameObjects/EntitySystems/ExamineSystem.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs b/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs index b2de94eaf3..53097731b2 100644 --- a/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs @@ -1,4 +1,5 @@ -using System.Threading; +using System.Linq; +using System.Threading; using System.Threading.Tasks; using Content.Shared.GameObjects.EntitySystemMessages; using Content.Shared.GameObjects.EntitySystems; @@ -18,6 +19,7 @@ using Robust.Shared.IoC; using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Players; +using Robust.Shared.Utility; namespace Content.Client.GameObjects.EntitySystems { @@ -132,9 +134,16 @@ namespace Content.Client.GameObjects.EntitySystems _requestCancelTokenSource = null; } - var richLabel = new RichTextLabel(); - richLabel.SetMessage(response.Message); - vBox.AddChild(richLabel); + foreach (var msg in response.Message.Tags.OfType()) + { + if (!string.IsNullOrWhiteSpace(msg.Text)) + { + var richLabel = new RichTextLabel(); + richLabel.SetMessage(response.Message); + vBox.AddChild(richLabel); + break; + } + } _examineTooltipOpen.Position += Vector2.ComponentMin(Vector2.Zero,_userInterfaceManager.StateRoot.Size - (panel.Size + _examineTooltipOpen.Position)); }