forked from Pathoschild/StardewMods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModEntry.cs
34 lines (31 loc) · 1022 Bytes
/
ModEntry.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
namespace Pathoschild.Stardew.NoDebugMode
{
/// <summary>The mod entry point.</summary>
internal class ModEntry : Mod
{
/*********
** Public methods
*********/
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
public override void Entry(IModHelper helper)
{
GameEvents.QuarterSecondTick += (sender, e) => this.SuppressGameDebug();
}
/*********
** Protected methods
*********/
/// <summary>Immediately suppress the game's debug mode if it's enabled.</summary>
private void SuppressGameDebug()
{
if (Game1.debugMode)
{
Game1.debugMode = false;
this.Monitor.Log("No Debug Mode suppressed SMAPI F2 debug mode.");
}
}
}
}