(5e16139ed) Added "OrderGiver" field to AI orders, always show reports from the currently controlled character (even if the report is not targeted for the character's class)

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:26:34 +03:00
parent 4dfd5f6fa2
commit e63ffe652e
8 changed files with 76 additions and 15 deletions
@@ -39,7 +39,9 @@ namespace Barotrauma
public Entity TargetEntity;
public ItemComponent TargetItemComponent;
public readonly bool UseController;
public Controller ConnectedController;
public Controller ConnectedController;
public Character OrderGiver;
public readonly string[] AppropriateJobs;
public readonly string[] Options;
@@ -120,7 +122,7 @@ namespace Barotrauma
}
}
public Order(Order prefab, Entity targetEntity, ItemComponent targetItem)
public Order(Order prefab, Entity targetEntity, ItemComponent targetItem, Character orderGiver = null)
{
Prefab = prefab;
@@ -134,6 +136,7 @@ namespace Barotrauma
TargetAllCharacters = prefab.TargetAllCharacters;
AppropriateJobs = prefab.AppropriateJobs;
FadeOutTime = prefab.FadeOutTime;
OrderGiver = orderGiver;
TargetEntity = targetEntity;
if (targetItem != null)