Merge pull request #8043 from pchote/exit-delays

Polish TS war factories.
This commit is contained in:
Matthias Mailänder
2015-04-28 22:22:29 +02:00
7 changed files with 27 additions and 2 deletions

View File

@@ -26,6 +26,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("AttackMove to a RallyPoint or stay where you are spawned.")]
public readonly bool MoveIntoWorld = true;
[Desc("Number of ticks to wait before moving into the world.")]
public readonly int ExitDelay = 0;
}
public class Exit { }

View File

@@ -77,6 +77,9 @@ namespace OpenRA.Mods.Common.Traits
{
if (exitinfo.MoveIntoWorld)
{
if (exitinfo.ExitDelay > 0)
newUnit.QueueActivity(new Wait(exitinfo.ExitDelay));
newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit));
newUnit.QueueActivity(new AttackMoveActivity(
newUnit, move.MoveTo(exitLocation, 1)));