Fixes dropping items to ground on storage insert fail (#7885)

This commit is contained in:
Júlio César Ueti
2022-05-03 00:05:23 -03:00
committed by GitHub
parent 44f65f30c0
commit cb7c820fcf

View File

@@ -572,7 +572,7 @@ namespace Content.Server.Storage.EntitySystems
var toInsert = hands.ActiveHandEntity;
if (!_sharedHandsSystem.TryDrop(player, toInsert.Value, handsComp: hands))
if (!CanInsert(uid, toInsert.Value, storageComp) || !_sharedHandsSystem.TryDrop(player, toInsert.Value, handsComp: hands))
{
Popup(uid, player, "comp-storage-cant-insert", storageComp);
return false;