Fix ghosts being able to empty backpacks by click dragging them onto tables (#1438)
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Server.Interfaces.GameObjects;
|
|||||||
using Content.Server.Interfaces.GameObjects.Components.Interaction;
|
using Content.Server.Interfaces.GameObjects.Components.Interaction;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
using Content.Shared.GameObjects.Components.Storage;
|
using Content.Shared.GameObjects.Components.Storage;
|
||||||
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
@@ -490,6 +491,11 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
|
|
||||||
bool IDragDrop.DragDrop(DragDropEventArgs eventArgs)
|
bool IDragDrop.DragDrop(DragDropEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
|
if (!ActionBlockerSystem.CanInteract(eventArgs.User))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!eventArgs.Target.TryGetComponent<PlaceableSurfaceComponent>(out var placeableSurface) ||
|
if (!eventArgs.Target.TryGetComponent<PlaceableSurfaceComponent>(out var placeableSurface) ||
|
||||||
!placeableSurface.IsPlaceable)
|
!placeableSurface.IsPlaceable)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user