Added /poweroutage dev command.

This commit is contained in:
atlimit8
2017-03-15 02:19:38 -05:00
parent 5a273700bf
commit 11933c7e2c
2 changed files with 14 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ namespace OpenRA.Mods.Common.Commands
register("all", "toggles all cheats and gives you some cash for your trouble.");
register("crash", "crashes the game.");
register("levelup", "adds a specified number of levels to the selected actors.");
register("poweroutage", "causes owners of selected actors to have a 5 second power outage.");
}
public void InvokeCommand(string name, string arg)
@@ -123,6 +124,11 @@ namespace OpenRA.Mods.Common.Commands
}
break;
case "poweroutage":
foreach (var player in world.Selection.Actors.Select(a => a.Owner.PlayerActor).Distinct())
world.IssueOrder(new Order("PowerOutage", player, false) { ExtraData = 250 });
break;
}
}