diff --git a/OpenRA.Mods.Common/Traits/Buildings/ProductionAirdrop.cs b/OpenRA.Mods.Common/Traits/Buildings/ProductionAirdrop.cs index 7311121182..23f7cc8bfd 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/ProductionAirdrop.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/ProductionAirdrop.cs @@ -39,6 +39,12 @@ namespace OpenRA.Mods.Common.Traits [Desc("Direction the aircraft should face to land.")] public readonly WAngle Facing = new(256); + [Desc("Tick that aircraft should wait before producing.")] + public readonly int WaitTickBeforeProduce = 0; + + [Desc("Tick that aircraft should wait after producing.")] + public readonly int WaitTickAfterProduce = 0; + public override object Create(ActorInitializer init) { return new ProductionAirdrop(init, this); } } @@ -104,6 +110,8 @@ namespace OpenRA.Mods.Common.Traits var exitCell = self.Location + exit.ExitCell; actor.QueueActivity(new Land(actor, Target.FromActor(self), WDist.Zero, WVec.Zero, info.Facing, clearCells: new CPos[1] { exitCell })); + if (info.WaitTickBeforeProduce > 0) + actor.QueueActivity(new Wait(info.WaitTickBeforeProduce)); actor.QueueActivity(new CallFunc(() => { if (!self.IsInWorld || self.IsDead) @@ -119,7 +127,8 @@ namespace OpenRA.Mods.Common.Traits Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.ReadyAudio, self.Owner.Faction.InternalName); TextNotificationsManager.AddTransientLine(self.Owner, info.ReadyTextNotification); })); - + if (info.WaitTickAfterProduce > 0) + actor.QueueActivity(new Wait(info.WaitTickAfterProduce)); actor.QueueActivity(new FlyOffMap(actor, Target.FromCell(w, endPos))); actor.QueueActivity(new RemoveSelf()); });