Cleanup more SpriteComponent warnings (part 2) (#37522)

* Cleanup warnings in DamageMarkerSystem

* Cleanup warnings in CuffableSystem

* Cleanup warnings in DeployableTurretSystem

* Cleanup warnings in StorageContainerVisualsSystem

* Cleanup warnings in ItemMapperSystem

* Cleanup warnings in ItemCounterSystem

* Cleanup warnings in RandomSpriteSystem

* Cleanup warnings in PowerCellSystem

* Cleanup warnings in ParticleAcceleratorPartVisualizerSystem

* Cleanup warnings in PaperVisualizerSystem

* Cleanup warnings in PoweredLightVisualizerSystem

* Cleanup warnings in LightBulbSystem

* Cleanup warnings in EmergencyLightSystem

* Cleanup warnings in DoorSystem

* Cleanup warnings in ClockSystem

* Cleanup warnings in BuckleSystem

* Cleanup warnings in JukeboxSystem
This commit is contained in:
Tayrtahn
2025-05-16 23:02:36 -04:00
committed by GitHub
parent b75fdd22de
commit 33f111c090
17 changed files with 110 additions and 87 deletions

View File

@@ -11,6 +11,7 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem<PoweredLight
{
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SpriteSystem _sprite = default!;
public override void Initialize()
{
@@ -27,16 +28,16 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem<PoweredLight
return;
if (comp.SpriteStateMap.TryGetValue(state, out var spriteState))
args.Sprite.LayerSetState(PoweredLightLayers.Base, spriteState);
_sprite.LayerSetRsiState((uid, args.Sprite), PoweredLightLayers.Base, spriteState);
if (args.Sprite.LayerExists(PoweredLightLayers.Glow))
if (_sprite.LayerExists((uid, args.Sprite), PoweredLightLayers.Glow))
{
if (TryComp<PointLightComponent>(uid, out var light))
{
args.Sprite.LayerSetColor(PoweredLightLayers.Glow, light.Color);
_sprite.LayerSetColor((uid, args.Sprite), PoweredLightLayers.Glow, light.Color);
}
args.Sprite.LayerSetVisible(PoweredLightLayers.Glow, state == PoweredLightState.On);
_sprite.LayerSetVisible((uid, args.Sprite), PoweredLightLayers.Glow, state == PoweredLightState.On);
}
SetBlinkingAnimation(
@@ -56,7 +57,7 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem<PoweredLight
return;
if (args.Key != PoweredLightVisualsComponent.BlinkingAnimationKey)
return;
if(!comp.IsBlinking)
if (!comp.IsBlinking)
return;
AnimationSystem.Play((uid, animationPlayer), BlinkingAnimation(comp), PoweredLightVisualsComponent.BlinkingAnimationKey);