(2ffcd0a06) Retry writing files in SaveUtil.DecompressFile up to 4 times (in case the file is being used by another process), fixed DecompressFiletoStream "retrying" 4 times even if the first try succeeds

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:44:15 +03:00
parent ec7e45e021
commit 7ae2b2f387
15 changed files with 256 additions and 256 deletions
@@ -28,6 +28,10 @@ namespace Barotrauma
private AIObjectiveGoTo gotoObjective;
private bool useController;
private AIObjectiveGoTo gotoObjective;
public override bool CanBeCompleted
{
get
@@ -47,6 +51,8 @@ namespace Barotrauma
public ItemComponent Component => component;
public ItemComponent Component => component;
public override float GetPriority(AIObjectiveManager objectiveManager)
{
if (gotoObjective != null && !gotoObjective.CanBeCompleted) { return 0; }
@@ -116,12 +122,6 @@ namespace Barotrauma
return;
}
else if (!character.Inventory.Items.Contains(component.Item))
{
//controller/target can't be selected and the item cannot be picked -> objective can't be completed
canBeCompleted = false;
return;
}
else if (!character.Inventory.Items.Contains(component.Item))
{
//controller/target can't be selected and the item cannot be picked -> objective can't be completed
abandon = true;