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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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;