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

@@ -12,6 +12,7 @@ namespace Content.Client.Stack
{
[Dependency] private readonly AppearanceSystem _appearanceSystem = default!;
[Dependency] private readonly ItemCounterSystem _counterSystem = default!;
[Dependency] private readonly SpriteSystem _sprite = default!;
public override void Initialize()
{
@@ -37,7 +38,7 @@ namespace Content.Client.Stack
for (var i = 0; i < sprite.AllLayers.Count(); i++)
{
sprite.LayerSetColor(i, color);
_sprite.LayerSetColor((uid, sprite), i, color);
}
}
@@ -107,7 +108,7 @@ namespace Content.Client.Stack
/// <param name="maxCount">The maximum possible number of items in the stack. Will be set to the number of selectable layers.</param>
private static void ApplyThreshold(StackLayerThresholdComponent comp, ref int actual, ref int maxCount)
{
// We must stop before we run out of thresholds or layers, whichever's smaller.
// We must stop before we run out of thresholds or layers, whichever's smaller.
maxCount = Math.Min(comp.Thresholds.Count + 1, maxCount);
var newActual = 0;
foreach (var threshold in comp.Thresholds)