]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
dont play sound if using tool was interrupted (#15302)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Tue, 11 Apr 2023 17:31:11 +0000 (17:31 +0000)
committerGitHub <noreply@github.com>
Tue, 11 Apr 2023 17:31:11 +0000 (03:31 +1000)
Content.Shared/Tools/Systems/SharedToolSystem.cs

index 28988314bea77ffc6133395df51af5002a74ad3f..b480e98df4aa6d0e9e7d5d3ccf614499a8d6f602 100644 (file)
@@ -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;