summaryrefslogtreecommitdiff
path: root/src/SMAPI/Patches
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Patches')
-rw-r--r--src/SMAPI/Patches/Game1Patcher.cs6
-rw-r--r--src/SMAPI/Patches/TitleMenuPatcher.cs4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/SMAPI/Patches/Game1Patcher.cs b/src/SMAPI/Patches/Game1Patcher.cs
index c5d98e9e..8f806790 100644
--- a/src/SMAPI/Patches/Game1Patcher.cs
+++ b/src/SMAPI/Patches/Game1Patcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Diagnostics.CodeAnalysis;
using HarmonyLib;
@@ -22,10 +20,10 @@ namespace StardewModdingAPI.Patches
** Fields
*********/
/// <summary>Simplifies access to private code.</summary>
- private static Reflector Reflection;
+ private static Reflector Reflection = null!; // initialized in constructor
/// <summary>A callback to invoke when the load stage changes.</summary>
- private static Action<LoadStage> OnStageChanged;
+ private static Action<LoadStage> OnStageChanged = null!; // initialized in constructor
/// <summary>Whether the game is running running the code in <see cref="Game1.loadForNewGame"/>.</summary>
private static bool IsInLoadForNewGame;
diff --git a/src/SMAPI/Patches/TitleMenuPatcher.cs b/src/SMAPI/Patches/TitleMenuPatcher.cs
index 56e5597c..18f1a830 100644
--- a/src/SMAPI/Patches/TitleMenuPatcher.cs
+++ b/src/SMAPI/Patches/TitleMenuPatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Diagnostics.CodeAnalysis;
using HarmonyLib;
@@ -19,7 +17,7 @@ namespace StardewModdingAPI.Patches
** Fields
*********/
/// <summary>A callback to invoke when the load stage changes.</summary>
- private static Action<LoadStage> OnStageChanged;
+ private static Action<LoadStage> OnStageChanged = null!; // initialized in constructor
/*********