diff --git a/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs b/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs index 31b14cd59d..e5732c06c8 100644 --- a/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs +++ b/OpenRA.Mods.Common/Activities/Air/ReturnToBase.cs @@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Activities return true; } - QueueChild(new Fly(self, Target.FromActor(dest))); + QueueChild(new Fly(self, Target.FromActor(dest), targetLineColor: Color.Green)); return true; } diff --git a/OpenRA.Mods.Common/Activities/Air/TakeOff.cs b/OpenRA.Mods.Common/Activities/Air/TakeOff.cs index e5b6fa8c21..c3d0e5d587 100644 --- a/OpenRA.Mods.Common/Activities/Air/TakeOff.cs +++ b/OpenRA.Mods.Common/Activities/Air/TakeOff.cs @@ -10,8 +10,10 @@ #endregion using System; +using System.Collections.Generic; using OpenRA.Activities; using OpenRA.Mods.Common.Traits; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Activities @@ -93,12 +95,21 @@ namespace OpenRA.Mods.Common.Activities if (!aircraft.Info.VTOL && assignTargetOnFirstRun) return true; - QueueChild(new AttackMoveActivity(self, () => move.MoveToTarget(self, target))); + QueueChild(new AttackMoveActivity(self, () => move.MoveToTarget(self, target, targetLineColor: Color.OrangeRed))); moveToRallyPoint = false; return false; } return true; } + + public override IEnumerable TargetLineNodes(Actor self) + { + if (ChildActivity == null && moveToRallyPoint) + yield return new TargetLineNode(target, Color.OrangeRed); + else + foreach (var n in ChildActivity.TargetLineNodes(self)) + yield return n; + } } } diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 37b958d99c..1b2638ceb7 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -1059,6 +1059,7 @@ namespace OpenRA.Mods.Common.Traits // Aircraft with TakeOffOnResupply would immediately take off again, so there's no point in forcing them to land // on a resupplier. For aircraft without it, it makes more sense to land than to idle above a free resupplier. self.QueueActivity(order.Queued, new ReturnToBase(self, null, !Info.TakeOffOnResupply)); + self.ShowTargetLines(); } else if (orderString == "Scatter") Nudge(self); diff --git a/OpenRA.Mods.Common/Traits/Production.cs b/OpenRA.Mods.Common/Traits/Production.cs index 23795c2e5b..42be476bcc 100644 --- a/OpenRA.Mods.Common/Traits/Production.cs +++ b/OpenRA.Mods.Common/Traits/Production.cs @@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Traits newUnit.QueueActivity(new Wait(exitinfo.ExitDelay, false)); newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit)); - newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1))); + newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1, targetLineColor: Color.OrangeRed))); } } diff --git a/OpenRA.Mods.Common/Traits/ProductionParadrop.cs b/OpenRA.Mods.Common/Traits/ProductionParadrop.cs index fddaa9d6e7..cf5389a31f 100644 --- a/OpenRA.Mods.Common/Traits/ProductionParadrop.cs +++ b/OpenRA.Mods.Common/Traits/ProductionParadrop.cs @@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits newUnit.QueueActivity(new Wait(exitinfo.ExitDelay, false)); newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit)); - newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1))); + newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1, targetLineColor: Color.OrangeRed))); } }