Cleanup more SpriteComponent warnings (part 6) (#37607)

* 1 warning in MechAssemblyVisualizerSystem

* 2 warnings in RecyclerVisualizerSystem

* 1 warning in ClusterGrenadeVisualizerSystem

* 2 warnings in BarSignSystem

* 4 warnings in AlertControl

* 1 warning in ToolSystem

* 2 warnings in PinpointerSystem

* 2 warnings in ClientSpriteMovementSystem

* 2 warnings in OptionsVisualizerSystem

* 1 warning in FlatpackSystem

* 1 warning in ZombieSystem

* 1 warning in StackSystem

* 1 warning in MiningOverlay

* 1 warning in FlippableClothingVisualizerSystem

* Guard clause for MechAssemblyVisualizerSystem

* Get SpriteSystem in AlertControl constructor
This commit is contained in:
Tayrtahn
2025-05-19 19:52:03 -04:00
committed by GitHub
parent c6f518de18
commit c5ac160ea8
14 changed files with 48 additions and 37 deletions

View File

@@ -7,6 +7,7 @@ namespace Content.Client.Pinpointer;
public sealed class PinpointerSystem : SharedPinpointerSystem
{
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly SpriteSystem _sprite = default!;
public override void Update(float frameTime)
{
@@ -18,7 +19,7 @@ public sealed class PinpointerSystem : SharedPinpointerSystem
// because eye can change it rotation anytime
// we need to update this arrow in a update loop
var query = EntityQueryEnumerator<PinpointerComponent, SpriteComponent>();
while (query.MoveNext(out var _, out var pinpointer, out var sprite))
while (query.MoveNext(out var uid, out var pinpointer, out var sprite))
{
if (!pinpointer.HasTarget)
continue;
@@ -30,10 +31,10 @@ public sealed class PinpointerSystem : SharedPinpointerSystem
case Distance.Close:
case Distance.Medium:
case Distance.Far:
sprite.LayerSetRotation(PinpointerLayers.Screen, angle);
_sprite.LayerSetRotation((uid, sprite), PinpointerLayers.Screen, angle);
break;
default:
sprite.LayerSetRotation(PinpointerLayers.Screen, Angle.Zero);
_sprite.LayerSetRotation((uid, sprite), PinpointerLayers.Screen, Angle.Zero);
break;
}
}