Activate now triggers UseDelay cooldown as well.

Fixes #4605
This commit is contained in:
Vera Aguilera Puerto
2021-10-02 11:02:02 +02:00
parent 665928cfcf
commit 1aadd3e57d

View File

@@ -207,6 +207,14 @@ namespace Content.Server.Interaction
private void InteractionActivate(IEntity user, IEntity used)
{
if (used.TryGetComponent<UseDelayComponent>(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);