Add a MoveIntoShroud switch to AttackMove as well.
This commit is contained in:
committed by
abcdefg30
parent
db2d432c39
commit
d4340fa799
@@ -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");
|
||||||
|
|||||||
@@ -824,6 +824,7 @@
|
|||||||
Type: GroundPosition
|
Type: GroundPosition
|
||||||
AttackMove:
|
AttackMove:
|
||||||
Voice: Move
|
Voice: Move
|
||||||
|
MoveIntoShroud: false
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
QuantizedFacings: 0
|
QuantizedFacings: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user