summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 22:06:07 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 22:06:07 -0400
commit2765e3f9b379f0dc2a5732c1ca9ba23dbe2a7f15 (patch)
tree3b97dd4aa6e9b7971dafa139c64a39c31e841fe6 /src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs
parentaa7b0caf4656d65ee156c3cf5ea786f561b850bb (diff)
downloadSMAPI-2765e3f9b379f0dc2a5732c1ca9ba23dbe2a7f15.tar.gz
SMAPI-2765e3f9b379f0dc2a5732c1ca9ba23dbe2a7f15.tar.bz2
SMAPI-2765e3f9b379f0dc2a5732c1ca9ba23dbe2a7f15.zip
enable nullable annotations in bundled mods (#837)
Diffstat (limited to 'src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs')
-rw-r--r--src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs b/src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs
index 5354f724..11f7ec69 100644
--- a/src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs
+++ b/src/SMAPI.Mods.ErrorHandler/Patches/NpcPatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
@@ -20,7 +18,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
** Fields
*********/
/// <summary>Writes messages to the console and log file on behalf of the game.</summary>
- private static IMonitor MonitorForGame;
+ private static IMonitor MonitorForGame = null!;
/*********
@@ -56,7 +54,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
/// <param name="__result">The return value of the original method.</param>
/// <param name="__exception">The exception thrown by the wrapped method, if any.</param>
/// <returns>Returns the exception to throw, if any.</returns>
- private static Exception Finalize_CurrentDialogue(NPC __instance, ref Stack<Dialogue> __result, Exception __exception)
+ private static Exception? Finalize_CurrentDialogue(NPC __instance, ref Stack<Dialogue> __result, Exception? __exception)
{
if (__exception == null)
return null;
@@ -73,7 +71,7 @@ namespace StardewModdingAPI.Mods.ErrorHandler.Patches
/// <param name="__result">The patched method's return value.</param>
/// <param name="__exception">The exception thrown by the wrapped method, if any.</param>
/// <returns>Returns the exception to throw, if any.</returns>
- private static Exception Finalize_ParseMasterSchedule(string rawData, NPC __instance, ref Dictionary<int, SchedulePathDescription> __result, Exception __exception)
+ private static Exception? Finalize_ParseMasterSchedule(string rawData, NPC __instance, ref Dictionary<int, SchedulePathDescription> __result, Exception? __exception)
{
if (__exception != null)
{