using Content.Server.Storage.Components;
using Content.Shared.Interaction;
using Content.Shared.Storage;
+using Content.Shared.Timing;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
[Dependency] private readonly SharedCombatModeSystem _combatMode = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
+ [Dependency] private readonly UseDelaySystem _useDelay = default!;
/// <inheritdoc />
public override void Initialize()
if (!Resolve(uid, ref storageComp) || !TryComp(entity, out ActorComponent? player))
return;
+ // prevent spamming bag open / honkerton honk sound
+ silent |= TryComp<UseDelayComponent>(uid, out var useDelay) && _useDelay.ActiveDelay(uid, useDelay);
if (!silent)
+ {
_audio.PlayPvs(storageComp.StorageOpenSound, uid);
+ if (useDelay != null)
+ _useDelay.BeginDelay(uid, useDelay);
+ }
Logger.DebugS(storageComp.LoggerName, $"Storage (UID {uid}) \"used\" by player session (UID {player.PlayerSession.AttachedEntity}).");