summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-28 00:39:01 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-28 00:39:01 -0400
commit698930820cc59c5e7193283afb7e9d535391afdb (patch)
treebf0eb5f9d51c6240207920cb03243302335f3be8 /src
parent586f27c4c265e06d0138e419f762e326bbe3ca46 (diff)
downloadSMAPI-698930820cc59c5e7193283afb7e9d535391afdb.tar.gz
SMAPI-698930820cc59c5e7193283afb7e9d535391afdb.tar.bz2
SMAPI-698930820cc59c5e7193283afb7e9d535391afdb.zip
log debug command output (#297)
Diffstat (limited to 'src')
-rw-r--r--src/TrainerMod/TrainerMod.cs8
1 files changed, 8 insertions, 0 deletions
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":