new setting to allow unlucky paratroopers

This commit is contained in:
Matthias Mailänder
2014-06-21 17:35:04 +02:00
parent 2907273ef2
commit a38d43019a
7 changed files with 18 additions and 6 deletions

View File

@@ -27,6 +27,9 @@ namespace OpenRA.Mods.RA
[Desc("In game ticks. Default value equates to 2 minutes.")]
public readonly int FlareTime = 25 * 60 * 2;
[Desc("Risks stuck units when they don't have the Paratrooper trait.")]
public readonly bool AllowImpassableCells = false;
public override object Create(ActorInitializer init) { return new ParatroopersPower(init.self, this); }
}
@@ -66,7 +69,7 @@ namespace OpenRA.Mods.RA
a.CancelActivity();
a.QueueActivity(new FlyAttack(Target.FromOrder(self.World, order)));
a.Trait<ParaDrop>().SetLZ(order.TargetLocation);
a.Trait<ParaDrop>().SetLZ(order.TargetLocation, !info.AllowImpassableCells);
var cargo = a.Trait<Cargo>();
foreach (var i in items)