Add a MoveIntoShroud switch to AttackMove as well.

This commit is contained in:
Matthias Mailänder
2017-08-29 15:21:55 +02:00
committed by abcdefg30
parent db2d432c39
commit d4340fa799
2 changed files with 7 additions and 0 deletions

View File

@@ -31,6 +31,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("The condition to grant to self while scanning for targets during an assault-move.")] [Desc("The condition to grant to self while scanning for targets during an assault-move.")]
public readonly string AssaultMoveScanCondition = null; public readonly string AssaultMoveScanCondition = null;
[Desc("Can the actor be ordered to move in to shroud?")]
public readonly bool MoveIntoShroud = true;
public object Create(ActorInitializer init) { return new AttackMove(init.Self, this); } public object Create(ActorInitializer init) { return new AttackMove(init.Self, this); }
} }
@@ -108,6 +111,9 @@ namespace OpenRA.Mods.Common.Traits
if (!order.Queued) if (!order.Queued)
self.CancelActivity(); self.CancelActivity();
if (!info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
return;
TargetLocation = move.NearestMoveableCell(order.TargetLocation); TargetLocation = move.NearestMoveableCell(order.TargetLocation);
self.SetTargetLine(Target.FromCell(self.World, TargetLocation.Value), Color.Red); self.SetTargetLine(Target.FromCell(self.World, TargetLocation.Value), Color.Red);
Activate(self, order.OrderString == "AssaultMove"); Activate(self, order.OrderString == "AssaultMove");

View File

@@ -824,6 +824,7 @@
Type: GroundPosition Type: GroundPosition
AttackMove: AttackMove:
Voice: Move Voice: Move
MoveIntoShroud: false
ActorLostNotification: ActorLostNotification:
BodyOrientation: BodyOrientation:
QuantizedFacings: 0 QuantizedFacings: 0