Better feedback when failing to insert into storage.

This commit is contained in:
Pieter-Jan Briers
2019-03-28 11:48:18 +01:00
parent 3fb42ca4ee
commit 8926669f3a

View File

@@ -14,6 +14,7 @@ using SS14.Shared.IoC;
using SS14.Shared.Log; using SS14.Shared.Log;
using SS14.Shared.Serialization; using SS14.Shared.Serialization;
using System.Collections.Generic; using System.Collections.Generic;
using Content.Shared.Interfaces;
using SS14.Shared.GameObjects.EntitySystemMessages; using SS14.Shared.GameObjects.EntitySystemMessages;
using SS14.Shared.ViewVariables; using SS14.Shared.ViewVariables;
@@ -132,13 +133,17 @@ namespace Content.Server.GameObjects
return false; return false;
//Check that we can drop the item from our hands first otherwise we obviously cant put it inside //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)) if (Insert(attackwith))
{ {
return true; return true;
} }
} }
else
{
Owner.PopupMessage(user, "Can't insert.");
}
return false; return false;
} }