Overhaul target line rendering:
- Targets are now defined by the activities - Queued activities are shown - Support custom attack colors
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
@@ -61,7 +62,6 @@ namespace OpenRA.Mods.Common.Activities
|
||||
foreach (var n in notifyHarvesterActions)
|
||||
n.MovingToResources(self, targetCell);
|
||||
|
||||
self.SetTargetLine(Target.FromCell(self.World, targetCell), Color.Red, false);
|
||||
QueueChild(move.MoveTo(targetCell, 2));
|
||||
return false;
|
||||
}
|
||||
@@ -106,5 +106,10 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
base.Cancel(self, keepQueue);
|
||||
}
|
||||
|
||||
public override IEnumerable<TargetLineNode> TargetLineNodes(Actor self)
|
||||
{
|
||||
yield return new TargetLineNode(Target.FromCell(self.World, targetCell), Color.Green);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user