diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index 80ccc0619a..ff4201acaf 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -242,13 +242,18 @@ namespace Content.Shared.Cuffs args.Cancel(); } - private void HandleStopPull(EntityUid uid, CuffableComponent component, AttemptStopPullingEvent args) + private void HandleStopPull(EntityUid uid, CuffableComponent component, ref AttemptStopPullingEvent args) { if (args.User == null || !Exists(args.User.Value)) return; if (args.User.Value == uid && !component.CanStillInteract) + { + //TODO: UX feedback. Simply blocking the normal interaction feels like an interface bug + args.Cancelled = true; + } + } private void OnRemoveCuffsAlert(Entity ent, ref RemoveCuffsAlertEvent args) diff --git a/Content.Shared/Movement/Pulling/Events/AttemptStopPullingEvent.cs b/Content.Shared/Movement/Pulling/Events/AttemptStopPullingEvent.cs index cd7edc5f62..a4d7f6c3ff 100644 --- a/Content.Shared/Movement/Pulling/Events/AttemptStopPullingEvent.cs +++ b/Content.Shared/Movement/Pulling/Events/AttemptStopPullingEvent.cs @@ -3,8 +3,10 @@ namespace Content.Shared.Pulling.Events; /// /// Raised when a request is made to stop pulling an entity. /// + +[ByRefEvent] public record struct AttemptStopPullingEvent(EntityUid? User = null) { public readonly EntityUid? User = User; public bool Cancelled; -} \ No newline at end of file +} diff --git a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs index 7fb9e825cd..3784dc0402 100644 --- a/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs +++ b/Content.Shared/Movement/Pulling/Systems/PullingSystem.cs @@ -599,7 +599,7 @@ public sealed class PullingSystem : EntitySystem return true; var msg = new AttemptStopPullingEvent(user); - RaiseLocalEvent(pullableUid, msg, true); + RaiseLocalEvent(pullableUid, ref msg, true); if (msg.Cancelled) return false;