From 6daa1bcf27596e4076773ea72c0efa20d16da5f1 Mon Sep 17 00:00:00 2001 From: zumorica Date: Fri, 22 May 2020 21:24:59 +0200 Subject: [PATCH] Only play tool sound if the use goes through --- .../GameObjects/Components/Interactable/ToolComponent.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs index 3d15516178..9ef6d8d96f 100644 --- a/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/ToolComponent.cs @@ -115,9 +115,12 @@ namespace Content.Server.GameObjects.Components.Interactable public virtual bool UseTool(IEntity user, IEntity target, ToolQuality toolQualityNeeded) { + if (!HasQuality(toolQualityNeeded) || !ActionBlockerSystem.CanInteract(user)) + return false; + PlayUseSound(); - return ActionBlockerSystem.CanInteract(user) && HasQuality(toolQualityNeeded); + return true; } protected void PlaySoundCollection(string name, float volume=-5f)