(b45ff81a1) Log an error if a client can't find the prefab for an item spawned by the server

This commit is contained in:
Joonas Rikkonen
2019-05-16 07:02:40 +03:00
parent 1be3897197
commit e7d1ae2cda
10 changed files with 201 additions and 29 deletions
@@ -905,6 +905,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);