]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Powered light sprite glows with color of their pointlight (#24612)
authorKara <lunarautomaton6@gmail.com>
Sat, 27 Jan 2024 17:43:45 +0000 (10:43 -0700)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 17:43:45 +0000 (09:43 -0800)
Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs

index db703128a305b16ea6a20ca741aded366c156f87..2dc7f5a8226aab27563ed131c4698f629392236a 100644 (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,