From 327b3b610f10a94498c0ab59ff89be35abf92ba7 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Thu, 23 Jul 2020 01:41:22 +0200 Subject: [PATCH] Fix ghosts being able to empty backpacks by click dragging them onto tables (#1438) --- .../Components/Items/Storage/ServerStorageComponent.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs index 3db0ad0831..ecdfb4c5f6 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs @@ -6,6 +6,7 @@ using Content.Server.Interfaces.GameObjects; using Content.Server.Interfaces.GameObjects.Components.Interaction; using Content.Server.Utility; using Content.Shared.GameObjects.Components.Storage; +using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; @@ -490,6 +491,11 @@ namespace Content.Server.GameObjects.Components.Items.Storage bool IDragDrop.DragDrop(DragDropEventArgs eventArgs) { + if (!ActionBlockerSystem.CanInteract(eventArgs.User)) + { + return false; + } + if (!eventArgs.Target.TryGetComponent(out var placeableSurface) || !placeableSurface.IsPlaceable) {