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

@@ -5,6 +5,8 @@ namespace Content.Client.Light.Visualizers;
public sealed class LightBulbSystem : VisualizerSystem<LightBulbComponent>
{
[Dependency] private readonly SpriteSystem _sprite = default!;
protected override void OnAppearanceChange(EntityUid uid, LightBulbComponent comp, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
@@ -16,13 +18,13 @@ public sealed class LightBulbSystem : VisualizerSystem<LightBulbComponent>
switch (state)
{
case LightBulbState.Normal:
args.Sprite.LayerSetState(LightBulbVisualLayers.Base, comp.NormalSpriteState);
_sprite.LayerSetRsiState((uid, args.Sprite), LightBulbVisualLayers.Base, comp.NormalSpriteState);
break;
case LightBulbState.Broken:
args.Sprite.LayerSetState(LightBulbVisualLayers.Base, comp.BrokenSpriteState);
_sprite.LayerSetRsiState((uid, args.Sprite), LightBulbVisualLayers.Base, comp.BrokenSpriteState);
break;
case LightBulbState.Burned:
args.Sprite.LayerSetState(LightBulbVisualLayers.Base, comp.BurnedSpriteState);
_sprite.LayerSetRsiState((uid, args.Sprite), LightBulbVisualLayers.Base, comp.BurnedSpriteState);
break;
}
}
@@ -30,7 +32,7 @@ public sealed class LightBulbSystem : VisualizerSystem<LightBulbComponent>
// also update sprites color
if (AppearanceSystem.TryGetData<Color>(uid, LightBulbVisuals.Color, out var color, args.Component))
{
args.Sprite.Color = color;
_sprite.SetColor((uid, args.Sprite), color);
}
}
}