(3b137aa1a) Merge remote-tracking branch 'origin/dev' into human-ai

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:36:05 +03:00
parent 5ba3c802ea
commit 8280ed9c1a
24 changed files with 415 additions and 187 deletions
@@ -1019,6 +1019,25 @@ namespace Barotrauma.Items.Components
}
}
if (targetItem.Prefab.DeconstructItems.Any())
{
inputContainer.Inventory.RemoveItem(targetItem);
Entity.Spawner.AddToRemoveQueue(targetItem);
MoveInputQueue();
PutItemsToLinkedContainer();
}
else
{
if (outputContainer.Inventory.Items.All(i => i != null))
{
targetItem.Drop(dropper: null);
}
else
{
outputContainer.Inventory.TryPutItem(targetItem, user: null, createNetworkEvent: true);
}
}
if (targetItem.Prefab.DeconstructItems.Any())
{
inputContainer.Inventory.RemoveItem(targetItem);