using Content.Server.AI.Operators; using Content.Server.AI.Operators.Movement; using Content.Server.AI.Utility.Considerations; using Content.Server.AI.WorldState; namespace Content.Server.AI.Utility.Actions.Test { /// /// Used for pathfinding debugging /// public sealed class MoveRightAndLeftTen : UtilityAction { public override bool CanOverride => false; public override void SetupOperators(Blackboard context) { var entMan = IoCManager.Resolve(); var currentPosition = entMan.GetComponent(Owner).Coordinates; var nextPosition = entMan.GetComponent(Owner).Coordinates.Offset(new Vector2(10.0f, 0.0f)); var originalPosOp = new MoveToGridOperator(Owner, currentPosition, 0.25f); var newPosOp = new MoveToGridOperator(Owner, nextPosition, 0.25f); ActionOperators = new Queue(new AiOperator[] { newPosOp, originalPosOp }); } protected override IReadOnlyCollection> GetConsiderations(Blackboard context) { var considerationsManager = IoCManager.Resolve(); return new[] { considerationsManager.Get() .BoolCurve(context), }; } } }