(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:
+1
-1
@@ -51,7 +51,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
protected override bool Filter(PowerContainer battery) => true;
|
||||
protected override float Average(PowerContainer battery) => 100 - battery.ChargePercentage;
|
||||
protected override float TargetEvaluation() => targets.Max(t => 100 - t.ChargePercentage);
|
||||
protected override IEnumerable<PowerContainer> GetList() => batteryList;
|
||||
protected override AIObjective ObjectiveConstructor(PowerContainer battery) => new AIObjectiveOperateItem(battery, character, Option, false) { IsLoop = true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user