diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-19 18:04:57 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-19 18:04:57 -0400 |
commit | 16281fb58944e7e829b184b014e27822c91c9f43 (patch) | |
tree | e9db3b9943d61163a87190c4293673a002d17da1 /src/TrainerMod/TrainerMod.cs | |
parent | c84310dfebafd3085dc418f3620154f9934865de (diff) | |
parent | cbb1777ba00f581b428e61a0f7245a87ac53cf09 (diff) | |
download | SMAPI-16281fb58944e7e829b184b014e27822c91c9f43.tar.gz SMAPI-16281fb58944e7e829b184b014e27822c91c9f43.tar.bz2 SMAPI-16281fb58944e7e829b184b014e27822c91c9f43.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/TrainerMod/TrainerMod.cs')
-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(); |