dont play sound if using tool was interrupted (#15302)

This commit is contained in:
deltanedas
2023-04-11 17:31:11 +00:00
committed by GitHub
parent 61b19b3164
commit 83f6266c5e

View 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;