From 6c205c4a795223b168bec203db685983efadd7a2 Mon Sep 17 00:00:00 2001 From: Bright0 <55061890+Bright0@users.noreply.github.com> Date: Thu, 2 Jul 2020 15:37:10 -0600 Subject: [PATCH] Can only remove item from storage if active hand is free (#1255) Co-authored-by: Bright0 --- .../Components/Items/Storage/ServerStorageComponent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs index 85efd110b4..6878efd0b0 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs @@ -288,16 +288,16 @@ namespace Content.Server.GameObjects var entity = _entityManager.GetEntity(remove.EntityUid); if (entity != null && storage.Contains(entity)) { - Remove(entity); var item = entity.GetComponent(); if (item != null && playerentity.TryGetComponent(out HandsComponent hands)) { - if (hands.PutInHand(item)) + if (hands.CanPutInHand(item) && hands.PutInHand(item)) + { return; + } } - entity.GetComponent().WorldPosition = ourtransform.WorldPosition; } } break;