From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Tue, 11 Apr 2023 17:31:11 +0000 (+0000) Subject: dont play sound if using tool was interrupted (#15302) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=83f6266c5e3405ccfd643a6e96489f81d9383aef;p=space-station-14.git dont play sound if using tool was interrupted (#15302) --- 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;