From 1aadd3e57d1d7c3a5d4de889bff6c8ae73dec55e Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sat, 2 Oct 2021 11:02:02 +0200 Subject: [PATCH] Activate now triggers UseDelay cooldown as well. Fixes #4605 --- Content.Server/Interaction/InteractionSystem.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 006450a77d..928c785c46 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -207,6 +207,14 @@ namespace Content.Server.Interaction private void InteractionActivate(IEntity user, IEntity used) { + if (used.TryGetComponent(out var delayComponent)) + { + if (delayComponent.ActiveDelay) + return; + + delayComponent.BeginDelay(); + } + if (!_actionBlockerSystem.CanInteract(user) || ! _actionBlockerSystem.CanUse(user)) return; @@ -595,8 +603,8 @@ namespace Content.Server.Interaction { if (delayComponent.ActiveDelay) return; - else - delayComponent.BeginDelay(); + + delayComponent.BeginDelay(); } var useMsg = new UseInHandEvent(user, used);