diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index 528708441c..16a1c09540 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Content.Client.State; using Content.Client.Viewport; +using Content.Shared.ActionBlocker; using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; @@ -37,6 +38,7 @@ namespace Content.Client.DragDrop [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; [Dependency] private readonly InputSystem _inputSystem = default!; + [Dependency] private readonly ActionBlockerSystem _actionBlockerSystem = default!; // how often to recheck possible targets (prevents calling expensive // check logic each update) @@ -413,6 +415,11 @@ namespace Content.Client.DragDrop /// null if the target doesn't support IDragDropOn private bool? ValidDragDrop(DragDropEvent eventArgs) { + if (!_actionBlockerSystem.CanInteract(eventArgs.User)) + { + return false; + } + bool? valid = null; foreach (var comp in eventArgs.Target.GetAllComponents()) diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 1578e53f5c..cc0408b129 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -139,6 +139,9 @@ namespace Content.Server.Interaction return; } + if (!_actionBlockerSystem.CanInteract(userEntity)) + return; + if (!EntityManager.TryGetEntity(msg.Dropped, out var dropped)) return; if (!EntityManager.TryGetEntity(msg.Target, out var target))