diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index 90fe4cb7d8ae..c20a6a46446c 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -38,6 +38,7 @@ public sealed class VendingMachineSystem : SharedVendingMachineSystem [Dependency] private readonly ThrowingSystem _throwingSystem = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly SpeakOnUIClosedSystem _speakOnUIClosed = default!; + [Dependency] private readonly SharedPointLightSystem _light = default!; private const float WallVendEjectDistanceFromWall = 1f; @@ -334,6 +335,12 @@ public void TryUpdateVisualState(EntityUid uid, VendingMachineComponent? vendCom finalState = VendingMachineVisualState.Off; } + if (_light.TryGetLight(uid, out var pointlight)) + { + var lightState = finalState != VendingMachineVisualState.Broken && finalState != VendingMachineVisualState.Off; + _light.SetEnabled(uid, lightState, pointlight); + } + _appearanceSystem.SetData(uid, VendingMachineVisuals.VisualState, finalState); }