Pass target line color to inner move activities.

This commit is contained in:
Paul Chote
2019-01-13 16:36:30 +00:00
parent 62102b9f77
commit b2d960ec19
32 changed files with 127 additions and 68 deletions

View File

@@ -9,6 +9,7 @@
*/
#endregion
using System.Drawing;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Cnc.Traits;
@@ -25,7 +26,7 @@ namespace OpenRA.Mods.Cnc.Activities
readonly INotifyInfiltration[] notifiers;
public Infiltrate(Actor self, Actor target, Infiltrates infiltrate)
: base(self, target, infiltrate.Info.EnterBehaviour)
: base(self, target, infiltrate.Info.EnterBehaviour, targetLineColor: Color.Red)
{
this.target = target;
infiltrates = infiltrate;

View File

@@ -10,6 +10,7 @@
#endregion
using System;
using System.Drawing;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Cnc.Traits;
@@ -73,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Activities
if (!allowMovement)
return NextActivity;
QueueChild(new MoveWithinRange(self, target, minRange, maxRange));
QueueChild(mobile.MoveWithinRange(target, minRange, maxRange, targetLineColor: Color.Red));
return this;
}

View File

@@ -205,7 +205,7 @@ namespace OpenRA.Mods.Cnc.Traits
self.CancelActivity();
self.SetTargetLine(target, Color.Red);
self.QueueActivity(new MoveAdjacentTo(self, target));
self.QueueActivity(new MoveAdjacentTo(self, target, targetLineColor: Color.Red));
self.QueueActivity(new CallFunc(StartDetonationSequence));
}
else if (order.OrderString == "Detonate")

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common;
@@ -181,11 +182,11 @@ namespace OpenRA.Mods.Cnc.Traits
public Activity MoveTo(CPos cell, int nearEnough) { return null; }
public Activity MoveTo(CPos cell, Actor ignoreActor) { return null; }
public Activity MoveWithinRange(Target target, WDist range) { return null; }
public Activity MoveWithinRange(Target target, WDist minRange, WDist maxRange) { return null; }
public Activity MoveFollow(Actor self, Target target, WDist minRange, WDist maxRange) { return null; }
public Activity MoveWithinRange(Target target, WDist range, Color? targetLineColor = null) { return null; }
public Activity MoveWithinRange(Target target, WDist minRange, WDist maxRange, Color? targetLineColor = null) { return null; }
public Activity MoveFollow(Actor self, Target target, WDist minRange, WDist maxRange, Color? targetLineColor = null) { return null; }
public Activity MoveIntoWorld(Actor self, CPos cell, SubCell subCell = SubCell.Any) { return null; }
public Activity MoveToTarget(Actor self, Target target) { return null; }
public Activity MoveToTarget(Actor self, Target target, Color? targetLineColor = null) { return null; }
public Activity MoveIntoTarget(Actor self, Target target) { return null; }
public Activity VisualMove(Actor self, WPos fromPos, WPos toPos) { return null; }