Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop
This commit is contained in:
+7
@@ -452,6 +452,10 @@ namespace Barotrauma
|
||||
newCurrentObjective.Abandoned += () => DismissSelf(order);
|
||||
CurrentOrders.Add(order.WithObjective(newCurrentObjective));
|
||||
}
|
||||
else if (!order.IsDismissal)
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to create an objective for the order: {order.Name}");
|
||||
}
|
||||
if (!HasOrders())
|
||||
{
|
||||
// Recreate objectives, because some of them may be removed, if impossible to complete (e.g. due to path finding)
|
||||
@@ -467,6 +471,9 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an AI objective based on the order. Note that the method can return null in the case of e.g. Dismissal orders or orders that erroneously target something non-interactable.
|
||||
/// </summary>
|
||||
public AIObjective CreateObjective(Order order, float priorityModifier = 1)
|
||||
{
|
||||
if (order == null || order.IsDismissal) { return null; }
|
||||
|
||||
Reference in New Issue
Block a user