(339649ad9) Fix the sprite of a newly created level object not being visible or editable until the next time the object is loaded.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:53:41 +03:00
parent b9c6c15da4
commit 5d53c9e250
12 changed files with 133 additions and 318 deletions
@@ -620,6 +620,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);