Merge pull request #5701 from pavlos256/dev-crash

Add /crash dev command
This commit is contained in:
Matthias Mailänder
2014-06-23 19:42:32 +02:00

View File

@@ -40,6 +40,7 @@ namespace OpenRA.Mods.RA
register("enabletech", "toggles the ability to build everything."); register("enabletech", "toggles the ability to build everything.");
register("instantcharge", "toggles instant support power charging."); register("instantcharge", "toggles instant support power charging.");
register("all", "toggles all cheats and gives you some cash for your trouble."); register("all", "toggles all cheats and gives you some cash for your trouble.");
register("crash", "crashes the game");
} }
public void InvokeCommand(string name, string arg) public void InvokeCommand(string name, string arg)
@@ -80,6 +81,9 @@ namespace OpenRA.Mods.RA
IssueDevCommand(world, "DevFastCharge"); IssueDevCommand(world, "DevFastCharge");
IssueDevCommand(world, "DevGiveCash"); IssueDevCommand(world, "DevGiveCash");
break; break;
case "crash":
throw new DevException();
} }
} }
@@ -87,5 +91,7 @@ namespace OpenRA.Mods.RA
{ {
world.IssueOrder(new Order(command, world.LocalPlayer.PlayerActor, false)); world.IssueOrder(new Order(command, world.LocalPlayer.PlayerActor, false));
} }
class DevException : Exception { }
} }
} }