(d4abdd937) Fix security officers fleeing from the enemy and others ignoring them until attacked :D

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:35:47 +03:00
parent 14e894cbc8
commit 5ba3c802ea
12 changed files with 269 additions and 245 deletions
@@ -1000,6 +1000,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);