diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 00:39:01 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 00:39:01 -0400 |
commit | 698930820cc59c5e7193283afb7e9d535391afdb (patch) | |
tree | bf0eb5f9d51c6240207920cb03243302335f3be8 | |
parent | 586f27c4c265e06d0138e419f762e326bbe3ca46 (diff) | |
download | SMAPI-698930820cc59c5e7193283afb7e9d535391afdb.tar.gz SMAPI-698930820cc59c5e7193283afb7e9d535391afdb.tar.bz2 SMAPI-698930820cc59c5e7193283afb7e9d535391afdb.zip |
log debug command output (#297)
-rw-r--r-- | release-notes.md | 1 | ||||
-rw-r--r-- | src/TrainerMod/TrainerMod.cs | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/release-notes.md b/release-notes.md index ce4ec082..f202f4d4 100644 --- a/release-notes.md +++ b/release-notes.md @@ -33,6 +33,7 @@ For modders: * Added `Context.IsInDrawLoop` for specialised mods. * Fixed `smapi-crash.txt` being copied from the default log even if a different path is specified with `--log-path`. * Fixed the content API not matching XNB filenames with two dots (like `a.b.xnb`) if you don't specify the `.xnb` extension. +* Fixed `debug` command output not printed to console. ## 1.13.1 See [log](https://github.com/Pathoschild/SMAPI/compare/1.13...1.13.1). diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index 95c7cbaf..815cfb17 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -124,9 +124,17 @@ namespace TrainerMod switch (command) { case "debug": + // build debug string string debugCommand = string.Join(" ", args); this.Monitor.Log($"Sending debug command to the game: {debugCommand}...", LogLevel.Info); + + // submit command + string oldOutput = Game1.debugOutput; Game1.game1.parseDebugInput(debugCommand); + + // log command output (if any) + if (Game1.debugOutput != oldOutput) + this.Monitor.Log($"> {Game1.debugOutput}", LogLevel.Info); break; case "save": |