(0976ef4d1) Fix repair hint text being displayed even when the item condition is not below the threshold. Move the GetHUDText method from shared to client project.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:29:50 +03:00
parent 32fe6e24de
commit ca3b5ae04b
9 changed files with 372 additions and 105 deletions
@@ -601,6 +601,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);