diff --git a/Content.Server/GameObjects/Components/Power/ApcComponent.cs b/Content.Server/GameObjects/Components/Power/ApcComponent.cs index 415ea9bce8..2cc349714c 100644 --- a/Content.Server/GameObjects/Components/Power/ApcComponent.cs +++ b/Content.Server/GameObjects/Components/Power/ApcComponent.cs @@ -2,9 +2,12 @@ using Content.Shared.GameObjects.Components.Power; using SS14.Server.GameObjects; using SS14.Server.GameObjects.Components.UserInterface; +using SS14.Server.GameObjects.EntitySystems; using SS14.Server.Interfaces.GameObjects; +using SS14.Shared.Audio; using SS14.Shared.GameObjects.Components.UserInterface; using SS14.Shared.Interfaces.GameObjects; +using SS14.Shared.IoC; namespace Content.Server.GameObjects.Components.Power { @@ -36,6 +39,7 @@ namespace Content.Server.GameObjects.Components.Power { _provider.MainBreaker = !_provider.MainBreaker; _uiDirty = true; + _clickSound(); } } @@ -64,7 +68,8 @@ namespace Content.Server.GameObjects.Components.Power if (_uiDirty) { - _userInterface.SetState(new ApcBoundInterfaceState(_provider.MainBreaker, extPowerState, newCharge / Storage.Capacity)); + _userInterface.SetState(new ApcBoundInterfaceState(_provider.MainBreaker, extPowerState, + newCharge / Storage.Capacity)); _uiDirty = false; } } @@ -110,5 +115,11 @@ namespace Content.Server.GameObjects.Components.Power _userInterface.Open(actor.playerSession); return true; } + + private void _clickSound() + { + IoCManager.Resolve().GetEntitySystem() + .Play("/Audio/machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f)); + } } } diff --git a/Resources/Audio/machines/machine_switch.ogg b/Resources/Audio/machines/machine_switch.ogg new file mode 100644 index 0000000000..6305d8dd83 Binary files /dev/null and b/Resources/Audio/machines/machine_switch.ogg differ