(a6aea4ada) Fixed clients failing to spawn items when using a different language than the server

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:39:31 +03:00
parent 82a3e21510
commit 5a4f50cfd2
16 changed files with 486 additions and 106 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);