Fix brig timer labels to displaying correctly. (#25033)

* 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.
This commit is contained in:
nikthechampiongr
2024-02-09 01:12:04 +02:00
committed by GitHub
parent e57cfea9f6
commit 1a3ce6cf2c

View File

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