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 OpenRA.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
@@ -79,7 +80,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
switch (state)
|
||||
{
|
||||
case PickupState.Intercept:
|
||||
QueueChild(movement.MoveWithinRange(Target.FromActor(cargo), WDist.FromCells(4), targetLineColor: Color.Yellow));
|
||||
QueueChild(movement.MoveWithinRange(Target.FromActor(cargo), WDist.FromCells(4)));
|
||||
state = PickupState.LockCarryable;
|
||||
return false;
|
||||
|
||||
@@ -110,6 +111,11 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return true;
|
||||
}
|
||||
|
||||
public override IEnumerable<TargetLineNode> TargetLineNodes(Actor self)
|
||||
{
|
||||
yield return new TargetLineNode(Target.FromActor(cargo), Color.Yellow);
|
||||
}
|
||||
|
||||
class AttachUnit : Activity
|
||||
{
|
||||
readonly Actor cargo;
|
||||
|
||||
Reference in New Issue
Block a user