Fix UseDelay issues (#27336)

* Fix UseDelay issues

- Fix it not predicting properly by deep-copying the classes (realistically they should be structs).
- Fix the `z` path not applying UseDelay similarly to the `e` path.

* click
This commit is contained in:
metalgearsloth
2024-04-26 17:58:06 +10:00
committed by GitHub
parent fe67634397
commit d745a788ea
3 changed files with 35 additions and 4 deletions

View File

@@ -973,8 +973,8 @@ namespace Content.Shared.Interaction
return false;
DoContactInteraction(user, used, activateMsg);
if (delayComponent != null)
_useDelay.TryResetDelay((used, delayComponent));
// Still need to call this even without checkUseDelay in case this gets relayed from Activate.
_useDelay.TryResetDelay(used, component: delayComponent);
if (!activateMsg.WasLogged)
_adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(user):user} activated {ToPrettyString(used):used}");
return true;