summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-01-17 12:21:33 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-01-17 12:21:33 -0500
commitb58d432a22bc39c3135779664293c7beff7b3bd4 (patch)
treee0b47a466c3615ad4751eba45e567f7f95312f9e /src/SMAPI/Framework/SCore.cs
parenta5ba931770cf70b071c00f19dbccb594fb245e06 (diff)
downloadSMAPI-b58d432a22bc39c3135779664293c7beff7b3bd4.tar.gz
SMAPI-b58d432a22bc39c3135779664293c7beff7b3bd4.tar.bz2
SMAPI-b58d432a22bc39c3135779664293c7beff7b3bd4.zip
subclass chatbox to log game errors
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r--src/SMAPI/Framework/SCore.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 06c88851..1b39065f 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -1054,6 +1054,13 @@ namespace StardewModdingAPI.Framework
this.OnReturnedToTitle();
}
+ // override chatbox
+ if (newStage == LoadStage.Loaded)
+ {
+ Game1.onScreenMenus.Remove(Game1.chatBox);
+ Game1.onScreenMenus.Add(Game1.chatBox = new SChatBox(this.LogManager.MonitorForGame));
+ }
+
// raise events
this.EventManager.LoadStageChanged.Raise(new LoadStageChangedEventArgs(oldStage, newStage));
if (newStage == LoadStage.None)