(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:
+2
-1
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Extensions;
|
||||
|
||||
@@ -66,7 +67,7 @@ namespace Barotrauma
|
||||
return ignore;
|
||||
}
|
||||
|
||||
protected override float Average(Item item) => 100 - item.ConditionPercentage;
|
||||
protected override float TargetEvaluation() => targets.Max(t => 100 - t.ConditionPercentage);
|
||||
protected override IEnumerable<Item> GetList() => Item.ItemList;
|
||||
protected override AIObjective ObjectiveConstructor(Item item) => new AIObjectiveRepairItem(character, item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user