From: Tayrtahn Date: Mon, 12 May 2025 20:08:29 +0000 (-0400) Subject: Cleanup warnings in `TextScreenSystem` (#37382) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9331b2875da5f1d316632088461a7e502c96ff9b;p=space-station-14.git Cleanup warnings in `TextScreenSystem` (#37382) Cleanup warnings in TextScreenSystem --- diff --git a/Content.Client/TextScreen/TextScreenSystem.cs b/Content.Client/TextScreen/TextScreenSystem.cs index 53a620bd46..eaa0c5e0b7 100644 --- a/Content.Client/TextScreen/TextScreenSystem.cs +++ b/Content.Client/TextScreen/TextScreenSystem.cs @@ -27,6 +27,7 @@ namespace Content.Client.TextScreen; public sealed class TextScreenSystem : VisualizerSystem { [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly SpriteSystem _sprite = default!; /// /// Contains char/state Key/Value pairs.
@@ -89,11 +90,11 @@ public sealed class TextScreenSystem : VisualizerSystem _gameTiming.CurTime) { var timer = EnsureComp(uid); @@ -154,7 +154,7 @@ public sealed class TextScreenSystem : VisualizerSystem(uid); @@ -190,7 +190,7 @@ public sealed class TextScreenSystem : VisualizerSystem(uid, out var sprite)) return; - string time = TimeToString( + var time = TimeToString( (_gameTiming.CurTime - timer.Target).Duration(), false, screen.HourFormat, screen.MinuteFormat, screen.SecondFormat ); - int min = Math.Min(time.Length, screen.RowLength); + var min = Math.Min(time.Length, screen.RowLength); - for (int i = 0; i < min; i++) + for (var i = 0; i < min; i++) { timer.LayerStatesToDraw[TimerMapKey + i] = GetStateFromChar(time[i]); - sprite.LayerSetOffset( + _sprite.LayerSetOffset( + (uid, sprite), TimerMapKey + i, Vector2.Multiply( new Vector2((i - min / 2f + 0.5f) * CharWidth, 0f), @@ -277,7 +279,7 @@ public sealed class TextScreenSystem : VisualizerSystem pairs.Value != null)) - sprite.LayerSetState(key, state); + _sprite.LayerSetRsiState((uid, sprite), key, state); } public override void Update(float frameTime) @@ -340,8 +342,8 @@ public sealed class TextScreenSystem : VisualizerSystem