(1c6954251) Add IsLoop property. Fixes operate item orders being removed when they are done. Instead of calling loopable objectives done, let's just use the priority system.
This commit is contained in:
+11
-2
@@ -100,6 +100,12 @@ namespace Barotrauma
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.AIOperate(deltaTime, character, this))
|
||||
{
|
||||
isCompleted = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
AddSubObjective(gotoObjective = new AIObjectiveGoTo(target.Item, character));
|
||||
@@ -155,14 +161,17 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.AIOperate(deltaTime, character, this)) isCompleted = true;
|
||||
if (component.AIOperate(deltaTime, character, this))
|
||||
{
|
||||
isCompleted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
return isCompleted;
|
||||
return isCompleted && !IsLoop;
|
||||
}
|
||||
|
||||
public override bool IsDuplicate(AIObjective otherObjective)
|
||||
|
||||
Reference in New Issue
Block a user