(1ac786058) AIObjectiveRescueAll now inherits AIObjectiveLoop. Implement reporting on rescue targets. Fix reporting not checking that the targets were in the current hull.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:39:07 +03:00
parent b3e9910f4f
commit c583181e3b
13 changed files with 312 additions and 285 deletions
@@ -696,6 +696,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);