diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 00:46:25 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 00:46:25 -0400 |
commit | 0c992e562ad1d3aafd12d0820bbd8ce0bb580c5d (patch) | |
tree | 3b394ff98ade72b331253a0ba900508142777f16 | |
parent | 698930820cc59c5e7193283afb7e9d535391afdb (diff) | |
download | SMAPI-0c992e562ad1d3aafd12d0820bbd8ce0bb580c5d.tar.gz SMAPI-0c992e562ad1d3aafd12d0820bbd8ce0bb580c5d.tar.bz2 SMAPI-0c992e562ad1d3aafd12d0820bbd8ce0bb580c5d.zip |
simplify debug command output (#297)
-rw-r--r-- | src/TrainerMod/TrainerMod.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index 815cfb17..9a3a8d0b 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -124,17 +124,15 @@ 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 debugCommand = string.Join(" ", args); string oldOutput = Game1.debugOutput; Game1.game1.parseDebugInput(debugCommand); - // log command output (if any) - if (Game1.debugOutput != oldOutput) - this.Monitor.Log($"> {Game1.debugOutput}", LogLevel.Info); + // show result + this.Monitor.Log(Game1.debugOutput != oldOutput + ? $"> {Game1.debugOutput}" + : "Sent debug command to the game, but there was no output.", LogLevel.Info); break; case "save": |