(439481a07) Set the random factor for initiative each time the objective changes and once per 5 secs when the idle is active. Change the formula. Fix the waiting after character has been unselected.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:30:06 +03:00
parent ca3b5ae04b
commit 348f21598e
9 changed files with 143 additions and 311 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);