From f46f5e283546dabedd6f437657ab6012d58c5b54 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:09:17 +1000 Subject: [PATCH] Fix storage area pickup sound playing multiple times (#32397) --- Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index ca4b788867..5c1e2bcfad 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -547,7 +547,7 @@ public abstract class SharedStorageSystem : EntitySystem var angle = targetXform.LocalRotation; - if (PlayerInsertEntityInWorld((uid, component), args.Args.User, entity)) + if (PlayerInsertEntityInWorld((uid, component), args.Args.User, entity, playSound: false)) { successfullyInserted.Add(entity); successfullyInsertedPositions.Add(position); @@ -1040,12 +1040,12 @@ public abstract class SharedStorageSystem : EntitySystem /// The player to insert an entity with /// /// true if inserted, false otherwise - public bool PlayerInsertEntityInWorld(Entity uid, EntityUid player, EntityUid toInsert) + public bool PlayerInsertEntityInWorld(Entity uid, EntityUid player, EntityUid toInsert, bool playSound = true) { if (!Resolve(uid, ref uid.Comp) || !_interactionSystem.InRangeUnobstructed(player, uid.Owner)) return false; - if (!Insert(uid, toInsert, out _, user: player, uid.Comp)) + if (!Insert(uid, toInsert, out _, user: player, uid.Comp, playSound: playSound)) { _popupSystem.PopupClient(Loc.GetString("comp-storage-cant-insert"), uid, player); return false; -- 2.51.2