Add target flashing for C4. Closes #4659

This commit is contained in:
ScottNZ
2014-07-10 02:51:15 +12:00
parent 8bce37710b
commit 04cd99cd75
3 changed files with 44 additions and 22 deletions

View File

@@ -22,6 +22,14 @@ namespace OpenRA.Mods.RA
[Desc("Delay to demolish the target once the C4 is planted." +
"Measured in game ticks. Default is 1.8 seconds.")]
public readonly int C4Delay = 45;
[Desc("Number of times to flash the target")]
public readonly int Flashes = 3;
[Desc("Delay before the flashing starts")]
public readonly int FlashesDelay = 4;
[Desc("Interval between each flash")]
public readonly int FlashInterval = 4;
[Desc("Duration of each flash")]
public readonly int FlashDuration = 3;
public object Create(ActorInitializer init) { return new C4Demolition(this); }
}
@@ -68,7 +76,8 @@ namespace OpenRA.Mods.RA
self.CancelActivity();
self.SetTargetLine(target, Color.Red);
self.QueueActivity(new Enter(target.Actor, new Demolish(target.Actor, info.C4Delay)));
self.QueueActivity(new Enter(target.Actor, new Demolish(
target.Actor, info.C4Delay, info.Flashes, info.FlashesDelay, info.FlashInterval, info.FlashDuration)));
}
public string VoicePhraseForOrder(Actor self, Order order)