diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-17 12:21:33 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-01-17 12:21:33 -0500 |
commit | b58d432a22bc39c3135779664293c7beff7b3bd4 (patch) | |
tree | e0b47a466c3615ad4751eba45e567f7f95312f9e /src/SMAPI/Framework/SCore.cs | |
parent | a5ba931770cf70b071c00f19dbccb594fb245e06 (diff) | |
download | SMAPI-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.cs | 7 |
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) |