(15bea4eef) Only ask medical assistance if there is a character with the rescue all objective. Don't allow to add targets if the bot is dead.
This commit is contained in:
@@ -321,11 +321,13 @@ namespace Barotrauma
|
||||
if (c.CurrentHull != hull) { continue; }
|
||||
if (AIObjectiveRescueAll.IsValidTarget(c, Character))
|
||||
{
|
||||
AddTargets<AIObjectiveRescueAll, Character>(c, Character);
|
||||
if (newOrder == null)
|
||||
if (AddTargets<AIObjectiveRescueAll, Character>(c, Character))
|
||||
{
|
||||
var orderPrefab = Order.PrefabList.Find(o => o.AITag == "requestfirstaid");
|
||||
newOrder = new Order(orderPrefab, c.CurrentHull, null, orderGiver: Character);
|
||||
if (newOrder == null)
|
||||
{
|
||||
var orderPrefab = Order.PrefabList.Find(o => o.AITag == "requestfirstaid");
|
||||
newOrder = new Order(orderPrefab, c.CurrentHull, null, orderGiver: Character);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Barotrauma
|
||||
|
||||
public bool AddTarget(T target)
|
||||
{
|
||||
if (character.IsDead) { return false; }
|
||||
if (ReportedTargets.Contains(target))
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user