diff --git a/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs b/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs index f29ce7cf2a..db0e8b861b 100644 --- a/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PoweredLightComponent.cs @@ -1,6 +1,12 @@ +using System; using SS14.Server.GameObjects; +using SS14.Server.GameObjects.EntitySystems; +using SS14.Shared.Audio; using SS14.Shared.Enums; using SS14.Shared.GameObjects; +using SS14.Shared.Interfaces.GameObjects; +using SS14.Shared.Interfaces.Timing; +using SS14.Shared.IoC; namespace Content.Server.GameObjects.Components.Power { @@ -8,6 +14,10 @@ namespace Content.Server.GameObjects.Components.Power { public override string Name => "PoweredLight"; + private static readonly TimeSpan _thunkDelay = TimeSpan.FromSeconds(2); + + private TimeSpan _lastThunk; + public override void Initialize() { base.Initialize(); @@ -21,6 +31,12 @@ namespace Content.Server.GameObjects.Components.Power { sprite.LayerSetState(0, "on"); light.State = LightState.On; + var time = IoCManager.Resolve().CurTime; + if (time > _lastThunk + _thunkDelay) + { + IoCManager.Resolve().GetEntitySystem() + .Play("/Audio/machines/light_tube_on.ogg", Owner, AudioParams.Default.WithVolume(-10f)); + } } else {