diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-09 17:16:13 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-09 17:16:13 -0400 |
commit | 7ba0518bfdfc06f2e80b6a0891689beda7f43aa7 (patch) | |
tree | 3594de1e488f593fe7b256b83b327c48d6c16823 /src/TrainerMod | |
parent | 3d732275874e2f36e13f10813e08b7ed2fc143f8 (diff) | |
download | SMAPI-7ba0518bfdfc06f2e80b6a0891689beda7f43aa7.tar.gz SMAPI-7ba0518bfdfc06f2e80b6a0891689beda7f43aa7.tar.bz2 SMAPI-7ba0518bfdfc06f2e80b6a0891689beda7f43aa7.zip |
add 'debug' console command
Diffstat (limited to 'src/TrainerMod')
-rw-r--r-- | src/TrainerMod/TrainerMod.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index 168b7e8e..95c7cbaf 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -111,7 +111,9 @@ namespace TrainerMod .Add("world_setminelevel", "Sets the mine level?\n\nUsage: world_setminelevel <value>\n- value: The target level (a number between 1 and 120).", this.HandleCommand) .Add("show_game_files", "Opens the game folder.", this.HandleCommand) - .Add("show_data_files", "Opens the folder containing the save and log files.", this.HandleCommand); + .Add("show_data_files", "Opens the folder containing the save and log files.", this.HandleCommand) + + .Add("debug", "Run one of the game's debug commands; for example, 'debug warp FarmHouse 1 1' warps the player to the farmhouse.", this.HandleCommand); } /// <summary>Handle a TrainerMod command.</summary> @@ -121,6 +123,12 @@ namespace TrainerMod { switch (command) { + case "debug": + string debugCommand = string.Join(" ", args); + this.Monitor.Log($"Sending debug command to the game: {debugCommand}...", LogLevel.Info); + Game1.game1.parseDebugInput(debugCommand); + break; + case "save": this.Monitor.Log("Saving the game...", LogLevel.Info); SaveGame.Save(); |