Deconstructors & fabricators drop created items on the floor if there's no more room in the inventory, deconstructor doesn't reset the activation button after deconstructing an item if there are still more items to go

This commit is contained in:
Regalis
2017-03-23 18:55:39 +02:00
parent e9e4e5f9d3
commit 4d19d0afc1
2 changed files with 29 additions and 11 deletions
@@ -375,7 +375,15 @@ namespace Barotrauma.Items.Components
}
}
Item.Spawner.QueueItem(fabricatedItem.TargetItem, containers[1].Inventory);
if (containers[1].Inventory.Items.All(i => i != null))
{
Item.Spawner.QueueItem(fabricatedItem.TargetItem, item.Position, item.Submarine);
}
else
{
Item.Spawner.QueueItem(fabricatedItem.TargetItem, containers[1].Inventory);
}
CancelFabricating();
}