(49f837fbb) Fix: operate battery or pump should not be looping objectives.
This commit is contained in:
+1
-1
@@ -48,6 +48,6 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
protected override AIObjective ObjectiveConstructor(PowerContainer battery)
|
||||
=> new AIObjectiveOperateItem(battery, character, objectiveManager, Option, false, priorityModifier: PriorityModifier) { IsLoop = true };
|
||||
=> new AIObjectiveOperateItem(battery, character, objectiveManager, Option, false, priorityModifier: PriorityModifier) { IsLoop = false };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ namespace Barotrauma
|
||||
}
|
||||
return true;
|
||||
}
|
||||
protected override AIObjective ObjectiveConstructor(Pump pump) => new AIObjectiveOperateItem(pump, character, objectiveManager, Option, false) { IsLoop = true };
|
||||
protected override float TargetEvaluation() => targets.Max(t => MathHelper.Lerp(100, 0, t.CurrFlow / t.MaxFlow));
|
||||
protected override IEnumerable<Pump> GetList()
|
||||
{
|
||||
@@ -52,5 +51,7 @@ namespace Barotrauma
|
||||
}
|
||||
return pumpList;
|
||||
}
|
||||
|
||||
protected override AIObjective ObjectiveConstructor(Pump pump) => new AIObjectiveOperateItem(pump, character, objectiveManager, Option, false) { IsLoop = false };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user