Powered light sprite glows with color of their pointlight (#24612)

This commit is contained in:
Kara
2024-01-27 10:43:45 -07:00
committed by GitHub
parent 69d9d9f34b
commit 4ab69709fe

View File

@@ -31,7 +31,14 @@ public sealed class PoweredLightVisualizerSystem : VisualizerSystem<PoweredLight
args.Sprite.LayerSetState(PoweredLightLayers.Base, spriteState);
if (args.Sprite.LayerExists(PoweredLightLayers.Glow))
{
if (TryComp<PointLightComponent>(uid, out var light))
{
args.Sprite.LayerSetColor(PoweredLightLayers.Glow, light.Color);
}
args.Sprite.LayerSetVisible(PoweredLightLayers.Glow, state == PoweredLightState.On);
}
SetBlinkingAnimation(
uid,