From 698930820cc59c5e7193283afb7e9d535391afdb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 28 May 2017 00:39:01 -0400 Subject: log debug command output (#297) --- src/TrainerMod/TrainerMod.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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": -- cgit