(3bb9485ad) Add automatic orders as objectives instead of orders so that we can take advantage of the existing priority system. Turn the priority values defined in the xml into modifiers.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:04:53 +03:00
parent 5def53f7bd
commit d0795791e7
38 changed files with 172 additions and 105 deletions
@@ -84,8 +84,7 @@ namespace Barotrauma
public bool FollowControlledCharacter;
public AIObjectiveGoTo(Entity target, Character character, bool repeat = false, bool getDivingGearIfNeeded = true)
: base (character, "")
public AIObjectiveGoTo(Entity target, Character character, bool repeat = false, bool getDivingGearIfNeeded = true, float priorityModifier = 1) : base (character, "", priorityModifier)
{
this.Target = target;
this.repeat = repeat;
@@ -96,8 +95,7 @@ namespace Barotrauma
}
public AIObjectiveGoTo(Vector2 simPos, Character character, bool repeat = false, bool getDivingGearIfNeeded = true)
: base(character, "")
public AIObjectiveGoTo(Vector2 simPos, Character character, bool repeat = false, bool getDivingGearIfNeeded = true, float priorityModifier = 1) : base(character, "", priorityModifier)
{
this.targetPos = simPos;
this.repeat = repeat;