diff --git a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs index 16c511b242..8a8d748b02 100644 --- a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs @@ -230,6 +230,10 @@ namespace Content.Server.GameObjects var inventorySlot = hands[slot]; var item = inventorySlot.ContainedEntity.GetComponent(); + + if (!_entitySystemManager.GetEntitySystem().TryDroppedInteraction(Owner, item.Owner)) + return false; + if (!inventorySlot.Remove(inventorySlot.ContainedEntity)) { return false; diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index bcc6405590..f3d19d7b56 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -685,9 +685,9 @@ namespace Content.Server.GameObjects.EntitySystems /// public void HandSelectedInteraction(IEntity user, IEntity item) { - var dropMsg = new HandSelectedMessage(user, item); - RaiseEvent(dropMsg); - if (dropMsg.Handled) + var handSelectedMsg = new HandSelectedMessage(user, item); + RaiseEvent(handSelectedMsg); + if (handSelectedMsg.Handled) { return; } @@ -707,9 +707,9 @@ namespace Content.Server.GameObjects.EntitySystems /// public void HandDeselectedInteraction(IEntity user, IEntity item) { - var dropMsg = new HandDeselectedMessage(user, item); - RaiseEvent(dropMsg); - if (dropMsg.Handled) + var handDeselectedMsg = new HandDeselectedMessage(user, item); + RaiseEvent(handDeselectedMsg); + if (handDeselectedMsg.Handled) { return; } diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index fd654de435..d4682cfddf 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -125,12 +125,6 @@ namespace Content.Server.GameObjects.EntitySystems if (handsComp.GetActiveHand == null) return false; - if (!_entitySystemManager.GetEntitySystem().TryDroppedInteraction(ent, handsComp.GetActiveHand.Owner)) - return false; - - if(handsComp.GetActiveHand != null && !_entitySystemManager.GetEntitySystem().TryDroppedInteraction(ent, handsComp.GetActiveHand.Owner)) - return false; - if (coords.InRange(_mapManager, ent.Transform.GridPosition, InteractionSystem.InteractionRange)) { handsComp.Drop(handsComp.ActiveIndex, coords);