diff --git a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs index 31cfdf5934..4ac42d949e 100644 --- a/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcNetComponents/PowerReceiverUsers/PoweredLightComponent.cs @@ -31,6 +31,8 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece [RegisterComponent] public class PoweredLightComponent : Component, IInteractHand, IInteractUsing, IMapInit, ISignalReceiver { + [Dependency] private IGameTiming _gameTiming = default!; + public override string Name => "PoweredLight"; private static readonly TimeSpan _thunkDelay = TimeSpan.FromSeconds(2); @@ -40,6 +42,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece private LightBulbType BulbType = LightBulbType.Tube; [ViewVariables] private ContainerSlot _lightBulbContainer; + [ViewVariables] private LightBulbComponent LightBulb { @@ -209,7 +212,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece sprite.LayerSetState(0, "on"); light.Enabled = true; light.Color = LightBulb.Color; - var time = IoCManager.Resolve().CurTime; + var time = _gameTiming.CurTime; if (time > _lastThunk + _thunkDelay) { _lastThunk = time;