(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:
@@ -21,7 +21,15 @@ namespace Barotrauma
|
||||
protected string option;
|
||||
protected bool abandon;
|
||||
|
||||
/// <summary>
|
||||
/// Can the objective be completed. That is, does the objective have failing subobjectives or other conditions that prevent it from completing.
|
||||
/// </summary>
|
||||
public virtual bool CanBeCompleted => !abandon && subObjectives.All(so => so.CanBeCompleted);
|
||||
|
||||
/// <summary>
|
||||
/// When true, the objective is never completed, unless CanBeCompleted returns false.
|
||||
/// </summary>
|
||||
public virtual bool IsLoop { get; set; }
|
||||
public IEnumerable<AIObjective> SubObjectives => subObjectives;
|
||||
public AIObjective CurrentSubObjective { get; private set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user