]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix brig timer labels to displaying correctly. (#25033)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Thu, 8 Feb 2024 23:12:04 +0000 (01:12 +0200)
committerGitHub <noreply@github.com>
Thu, 8 Feb 2024 23:12:04 +0000 (18:12 -0500)
* Fix brig timer labels to displaying correctly.

The TextScreenSystem was expecting a string, but the value inputted for
the label was an array of strings.

* Address nitpick

This should do the exact same thing but it is semantically clearer I guess.

Content.Server/DeviceLinking/Systems/SignalTimerSystem.cs

index 0426ee7cc3613f9129ec6a0a21ef53bd08a8bb6d..f9c2d3430e99666c085dbba3e5c1e28126d0d552 100644 (file)
@@ -68,7 +68,7 @@ public sealed class SignalTimerSystem : EntitySystem
 
         if (TryComp<AppearanceComponent>(uid, out var appearance))
         {
-            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, new[] { signalTimer.Label }, appearance);
+            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, signalTimer.Label, appearance);
         }
 
         _audio.PlayPvs(signalTimer.DoneSound, uid);
@@ -142,7 +142,7 @@ public sealed class SignalTimerSystem : EntitySystem
         component.Label = args.Text[..Math.Min(5, args.Text.Length)];
 
         if (!HasComp<ActiveSignalTimerComponent>(uid))
-            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, new string?[] { component.Label });
+            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, component.Label);
     }
 
     /// <summary>
@@ -186,7 +186,7 @@ public sealed class SignalTimerSystem : EntitySystem
         if (appearance != null)
         {
             _appearanceSystem.SetData(uid, TextScreenVisuals.TargetTime, timer.TriggerTime, appearance);
-            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, new string?[] { }, appearance);
+            _appearanceSystem.SetData(uid, TextScreenVisuals.ScreenText, string.Empty, appearance);
         }
 
         _signalSystem.InvokePort(uid, component.StartPort);