From 8926669f3a92045f69caea66747936845721bb2c Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 28 Mar 2019 11:48:18 +0100 Subject: [PATCH] Better feedback when failing to insert into storage. --- .../Components/Items/Storage/ServerStorageComponent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs index f2070b1439..ac93415baa 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs @@ -14,6 +14,7 @@ using SS14.Shared.IoC; using SS14.Shared.Log; using SS14.Shared.Serialization; using System.Collections.Generic; +using Content.Shared.Interfaces; using SS14.Shared.GameObjects.EntitySystemMessages; using SS14.Shared.ViewVariables; @@ -132,13 +133,17 @@ namespace Content.Server.GameObjects return false; //Check that we can drop the item from our hands first otherwise we obviously cant put it inside - if (hands.Drop(hands.ActiveIndex)) + if (CanInsert(hands.GetActiveHand.Owner) && hands.Drop(hands.ActiveIndex)) { if (Insert(attackwith)) { return true; } } + else + { + Owner.PopupMessage(user, "Can't insert."); + } return false; }