(43c3787ae) Refactor AIObjectiveRescue and remove ShouldInterruptSubObjective property. Not yet tested.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:40:35 +03:00
parent 7d0d669cdc
commit 42a023e811
12 changed files with 358 additions and 150 deletions
@@ -77,13 +77,6 @@ namespace Barotrauma
{
#if DEBUG
DebugConsole.NewMessage($"Removing subobjective {subObjective.DebugTag} of {DebugTag}, because it cannot be completed.");
#endif
subObjectives.Remove(subObjective);
}
else if (subObjective.ShouldInterruptSubObjective(subObjective))
{
#if DEBUG
DebugConsole.NewMessage($"Removing subobjective {subObjective.DebugTag} of {DebugTag}, because it is interrupted.");
#endif
subObjectives.Remove(subObjective);
}
@@ -199,9 +192,6 @@ namespace Barotrauma
}
}
// TODO: remove
protected virtual bool ShouldInterruptSubObjective(AIObjective subObjective) => false;
public virtual void OnSelected()
{
// Should we reset steering here?