(1137f730e) Instead of forcing the looping objectives to use the average, let them decide the method of evaluating the targets. Use the highest priority for now.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:11:32 +03:00
parent 759e4aee0d
commit de8a23f687
16 changed files with 115 additions and 24 deletions
@@ -52,7 +52,7 @@ namespace Barotrauma
}
public override bool IsDuplicate(AIObjective otherObjective) => otherObjective is AIObjectiveFixLeaks;
protected override float Average(Gap gap) => GetLeakSeverity(gap);
protected override float TargetEvaluation() => targets.Max(t => GetLeakSeverity(t));
protected override IEnumerable<Gap> GetList() => Gap.GapList;
protected override AIObjective ObjectiveConstructor(Gap gap) => new AIObjectiveFixLeak(gap, character);
}