diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index e0ffed9177..6f3cd3612c 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -2,12 +2,16 @@ using System.Linq; using Content.Server.GameObjects.Components.Access; using Content.Server.GameObjects.Components.Mobs; +using Content.Server.Interfaces.GameObjects; using Content.Shared.GameObjects.Components.Doors; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; +using Robust.Server.GameObjects.EntitySystems; +using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; +using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Maths; using Robust.Shared.Serialization; @@ -35,7 +39,7 @@ namespace Content.Server.GameObjects protected bool AutoClose = true; protected const float AutoCloseDelay = 5; protected float CloseSpeed = AutoCloseDelay; - + private ICollidableComponent _collidableComponent; private AppearanceComponent _appearance; private CancellationTokenSource _cancellationTokenSource; @@ -145,7 +149,14 @@ namespace Content.Server.GameObjects Deny(); return; } + Open(); + + if (user.TryGetComponent(out HandsComponent hands) && hands.Count == 0) + { + EntitySystem.Get().PlayFromEntity("/Audio/Effects/bang.ogg", Owner, + AudioParams.Default.WithVolume(-2)); + } } public void Open() @@ -296,7 +307,7 @@ namespace Content.Server.GameObjects { OpenTimeCounter += frameTime; } - + if (OpenTimeCounter > CloseSpeed) { if (!CanClose() || !Close()) diff --git a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs index 4e249d4a8e..b43b315899 100644 --- a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs @@ -55,6 +55,8 @@ namespace Content.Server.GameObjects // Mostly arbitrary. public const float PickupRange = 2; + [ViewVariables] public int Count => _orderedHands.Count; + public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); diff --git a/Resources/Audio/effects/bang.ogg b/Resources/Audio/effects/bang.ogg new file mode 100644 index 0000000000..656983f098 Binary files /dev/null and b/Resources/Audio/effects/bang.ogg differ