From 83f6266c5e3405ccfd643a6e96489f81d9383aef Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Tue, 11 Apr 2023 17:31:11 +0000 Subject: [PATCH] dont play sound if using tool was interrupted (#15302) --- Content.Shared/Tools/Systems/SharedToolSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Tools/Systems/SharedToolSystem.cs b/Content.Shared/Tools/Systems/SharedToolSystem.cs index 28988314be..b480e98df4 100644 --- a/Content.Shared/Tools/Systems/SharedToolSystem.cs +++ b/Content.Shared/Tools/Systems/SharedToolSystem.cs @@ -22,7 +22,9 @@ public abstract partial class SharedToolSystem : EntitySystem private void OnDoAfter(EntityUid uid, ToolComponent tool, ToolDoAfterEvent args) { - PlayToolSound(uid, tool, args.User); + if (!args.Cancelled) + PlayToolSound(uid, tool, args.User); + var ev = args.WrappedEvent; ev.DoAfter = args.DoAfter; -- 2.51.2