summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 19:00:24 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-13 19:00:24 -0400
commit6e9e8aef1ef97e1a4ef4410ce300cb1c47eca986 (patch)
tree6aa94e6df974362b4ea1581e83cd33d9ffc40639 /src/SMAPI/Framework
parent40aebb74c65e0c7300b5f4fcb066f3fd2b2a5fdd (diff)
downloadSMAPI-6e9e8aef1ef97e1a4ef4410ce300cb1c47eca986.tar.gz
SMAPI-6e9e8aef1ef97e1a4ef4410ce300cb1c47eca986.tar.bz2
SMAPI-6e9e8aef1ef97e1a4ef4410ce300cb1c47eca986.zip
enable nullable annotations in SMAPI where no changes are needed (#837)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/Commands/IInternalCommand.cs2
-rw-r--r--src/SMAPI/Framework/Commands/ReloadI18nCommand.cs2
-rw-r--r--src/SMAPI/Framework/Content/AssetOperationGroup.cs2
-rw-r--r--src/SMAPI/Framework/Content/TilesheetReference.cs2
-rw-r--r--src/SMAPI/Framework/DeprecationWarning.cs2
-rw-r--r--src/SMAPI/Framework/Events/EventManager.cs2
-rw-r--r--src/SMAPI/Framework/Events/IManagedEvent.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModContentEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModDisplayEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModEventsBase.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModGameLoopEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModInputEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModMultiplayerEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModPlayerEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModSpecialisedEvents.cs2
-rw-r--r--src/SMAPI/Framework/Events/ModWorldEvents.cs2
-rw-r--r--src/SMAPI/Framework/Exceptions/SAssemblyLoadFailedException.cs2
-rw-r--r--src/SMAPI/Framework/Input/IInputStateBuilder.cs2
-rw-r--r--src/SMAPI/Framework/Input/KeyboardStateBuilder.cs4
-rw-r--r--src/SMAPI/Framework/Input/MouseStateBuilder.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/BaseHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/InputHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/TranslationHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModLinked.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/AssemblyLoadStatus.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/IInstructionHandler.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/IncompatibleInstructionException.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/PlatformAssemblyMap.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs5
-rw-r--r--src/SMAPI/Framework/ModLoading/Rewriters/ArchitectureAssemblyRewriter.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/Symbols/SymbolReader.cs2
-rw-r--r--src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs2
-rw-r--r--src/SMAPI/Framework/Monitor.cs2
-rw-r--r--src/SMAPI/Framework/Networking/SGalaxyNetClient.cs2
-rw-r--r--src/SMAPI/Framework/Networking/SGalaxyNetServer.cs2
-rw-r--r--src/SMAPI/Framework/Networking/SLidgrenClient.cs2
-rw-r--r--src/SMAPI/Framework/Networking/SLidgrenServer.cs2
-rw-r--r--src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs2
-rw-r--r--src/SMAPI/Framework/SChatBox.cs2
-rw-r--r--src/SMAPI/Framework/SGameRunner.cs4
-rw-r--r--src/SMAPI/Framework/Singleton.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/BaseDisposableWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/ICollectionWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/IDictionaryWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/IValueWatcher.cs2
-rw-r--r--src/SMAPI/Framework/StateTracking/IWatcher.cs2
-rw-r--r--src/SMAPI/Framework/Utilities/ContextHash.cs2
55 files changed, 4 insertions, 113 deletions
diff --git a/src/SMAPI/Framework/Commands/IInternalCommand.cs b/src/SMAPI/Framework/Commands/IInternalCommand.cs
index 32e3e9f1..abf105b6 100644
--- a/src/SMAPI/Framework/Commands/IInternalCommand.cs
+++ b/src/SMAPI/Framework/Commands/IInternalCommand.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.Commands
{
/// <summary>A core SMAPI console command.</summary>
diff --git a/src/SMAPI/Framework/Commands/ReloadI18nCommand.cs b/src/SMAPI/Framework/Commands/ReloadI18nCommand.cs
index 2043b35e..12328bb6 100644
--- a/src/SMAPI/Framework/Commands/ReloadI18nCommand.cs
+++ b/src/SMAPI/Framework/Commands/ReloadI18nCommand.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Framework.Commands
diff --git a/src/SMAPI/Framework/Content/AssetOperationGroup.cs b/src/SMAPI/Framework/Content/AssetOperationGroup.cs
index e3c3f92c..a2fcb722 100644
--- a/src/SMAPI/Framework/Content/AssetOperationGroup.cs
+++ b/src/SMAPI/Framework/Content/AssetOperationGroup.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.Content
{
/// <summary>A set of operations to apply to an asset for a given <see cref="IAssetEditor"/> or <see cref="IAssetLoader"/> implementation.</summary>
diff --git a/src/SMAPI/Framework/Content/TilesheetReference.cs b/src/SMAPI/Framework/Content/TilesheetReference.cs
index cdc4bc62..0339b802 100644
--- a/src/SMAPI/Framework/Content/TilesheetReference.cs
+++ b/src/SMAPI/Framework/Content/TilesheetReference.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using xTile.Dimensions;
namespace StardewModdingAPI.Framework.Content
diff --git a/src/SMAPI/Framework/DeprecationWarning.cs b/src/SMAPI/Framework/DeprecationWarning.cs
index f155358b..5201b06c 100644
--- a/src/SMAPI/Framework/DeprecationWarning.cs
+++ b/src/SMAPI/Framework/DeprecationWarning.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework
{
/// <summary>A deprecation warning for a mod.</summary>
diff --git a/src/SMAPI/Framework/Events/EventManager.cs b/src/SMAPI/Framework/Events/EventManager.cs
index c977e73d..41540047 100644
--- a/src/SMAPI/Framework/Events/EventManager.cs
+++ b/src/SMAPI/Framework/Events/EventManager.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using StardewModdingAPI.Events;
namespace StardewModdingAPI.Framework.Events
diff --git a/src/SMAPI/Framework/Events/IManagedEvent.cs b/src/SMAPI/Framework/Events/IManagedEvent.cs
index 57277576..e4e3ca08 100644
--- a/src/SMAPI/Framework/Events/IManagedEvent.cs
+++ b/src/SMAPI/Framework/Events/IManagedEvent.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.Events
{
/// <summary>Metadata for an event raised by SMAPI.</summary>
diff --git a/src/SMAPI/Framework/Events/ModContentEvents.cs b/src/SMAPI/Framework/Events/ModContentEvents.cs
index f198b793..beb96031 100644
--- a/src/SMAPI/Framework/Events/ModContentEvents.cs
+++ b/src/SMAPI/Framework/Events/ModContentEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModDisplayEvents.cs b/src/SMAPI/Framework/Events/ModDisplayEvents.cs
index b2110cce..48f55324 100644
--- a/src/SMAPI/Framework/Events/ModDisplayEvents.cs
+++ b/src/SMAPI/Framework/Events/ModDisplayEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModEvents.cs b/src/SMAPI/Framework/Events/ModEvents.cs
index e8f8885d..1fb3482c 100644
--- a/src/SMAPI/Framework/Events/ModEvents.cs
+++ b/src/SMAPI/Framework/Events/ModEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using StardewModdingAPI.Events;
namespace StardewModdingAPI.Framework.Events
diff --git a/src/SMAPI/Framework/Events/ModEventsBase.cs b/src/SMAPI/Framework/Events/ModEventsBase.cs
index 295caa0d..77708fc1 100644
--- a/src/SMAPI/Framework/Events/ModEventsBase.cs
+++ b/src/SMAPI/Framework/Events/ModEventsBase.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.Events
{
/// <summary>An internal base class for event API classes.</summary>
diff --git a/src/SMAPI/Framework/Events/ModGameLoopEvents.cs b/src/SMAPI/Framework/Events/ModGameLoopEvents.cs
index 51803daf..5f0db369 100644
--- a/src/SMAPI/Framework/Events/ModGameLoopEvents.cs
+++ b/src/SMAPI/Framework/Events/ModGameLoopEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModInputEvents.cs b/src/SMAPI/Framework/Events/ModInputEvents.cs
index 6af79c59..40edf806 100644
--- a/src/SMAPI/Framework/Events/ModInputEvents.cs
+++ b/src/SMAPI/Framework/Events/ModInputEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModMultiplayerEvents.cs b/src/SMAPI/Framework/Events/ModMultiplayerEvents.cs
index 7d3ce510..b90f64fa 100644
--- a/src/SMAPI/Framework/Events/ModMultiplayerEvents.cs
+++ b/src/SMAPI/Framework/Events/ModMultiplayerEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModPlayerEvents.cs b/src/SMAPI/Framework/Events/ModPlayerEvents.cs
index dac8f05b..b2d89e9a 100644
--- a/src/SMAPI/Framework/Events/ModPlayerEvents.cs
+++ b/src/SMAPI/Framework/Events/ModPlayerEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModSpecialisedEvents.cs b/src/SMAPI/Framework/Events/ModSpecialisedEvents.cs
index 4b438034..7980208b 100644
--- a/src/SMAPI/Framework/Events/ModSpecialisedEvents.cs
+++ b/src/SMAPI/Framework/Events/ModSpecialisedEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Events/ModWorldEvents.cs b/src/SMAPI/Framework/Events/ModWorldEvents.cs
index 614945c7..a7b7d799 100644
--- a/src/SMAPI/Framework/Events/ModWorldEvents.cs
+++ b/src/SMAPI/Framework/Events/ModWorldEvents.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/Exceptions/SAssemblyLoadFailedException.cs b/src/SMAPI/Framework/Exceptions/SAssemblyLoadFailedException.cs
index 4e03a687..ec9279f1 100644
--- a/src/SMAPI/Framework/Exceptions/SAssemblyLoadFailedException.cs
+++ b/src/SMAPI/Framework/Exceptions/SAssemblyLoadFailedException.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Framework.Exceptions
diff --git a/src/SMAPI/Framework/Input/IInputStateBuilder.cs b/src/SMAPI/Framework/Input/IInputStateBuilder.cs
index 3fb62686..28d62439 100644
--- a/src/SMAPI/Framework/Input/IInputStateBuilder.cs
+++ b/src/SMAPI/Framework/Input/IInputStateBuilder.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.Input
diff --git a/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs b/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs
index 81ca0ebb..f66fbd07 100644
--- a/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs
+++ b/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Input;
@@ -29,7 +27,7 @@ namespace StardewModdingAPI.Framework.Input
this.State = state;
this.PressedButtons.Clear();
- foreach (var button in state.GetPressedKeys())
+ foreach (Keys button in state.GetPressedKeys())
this.PressedButtons.Add(button);
}
diff --git a/src/SMAPI/Framework/Input/MouseStateBuilder.cs b/src/SMAPI/Framework/Input/MouseStateBuilder.cs
index 85b38d32..c2a0891b 100644
--- a/src/SMAPI/Framework/Input/MouseStateBuilder.cs
+++ b/src/SMAPI/Framework/Input/MouseStateBuilder.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using Microsoft.Xna.Framework.Input;
diff --git a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs
index 1cd1a6b3..5a3d4bed 100644
--- a/src/SMAPI/Framework/ModHelpers/BaseHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/BaseHelper.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.ModHelpers
{
/// <summary>The common base class for mod helpers.</summary>
diff --git a/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
index 336214e2..d39abc7d 100644
--- a/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.IO;
diff --git a/src/SMAPI/Framework/ModHelpers/InputHelper.cs b/src/SMAPI/Framework/ModHelpers/InputHelper.cs
index 29f80d87..88caf4c3 100644
--- a/src/SMAPI/Framework/ModHelpers/InputHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/InputHelper.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewModdingAPI.Framework.Input;
using StardewModdingAPI.Utilities;
diff --git a/src/SMAPI/Framework/ModHelpers/ModHelper.cs b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
index 3cfe52bf..e1529a75 100644
--- a/src/SMAPI/Framework/ModHelpers/ModHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.IO;
using StardewModdingAPI.Events;
diff --git a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
index 37345a76..869664fe 100644
--- a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using StardewValley;
diff --git a/src/SMAPI/Framework/ModLinked.cs b/src/SMAPI/Framework/ModLinked.cs
index 5a3e38ca..8cfe6f5f 100644
--- a/src/SMAPI/Framework/ModLinked.cs
+++ b/src/SMAPI/Framework/ModLinked.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework
{
/// <summary>A generic tuple which links something to a mod.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/AssemblyLoadStatus.cs b/src/SMAPI/Framework/ModLoading/AssemblyLoadStatus.cs
index d2d5d83b..11be19fc 100644
--- a/src/SMAPI/Framework/ModLoading/AssemblyLoadStatus.cs
+++ b/src/SMAPI/Framework/ModLoading/AssemblyLoadStatus.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.ModLoading
{
/// <summary>Indicates the result of an assembly load.</summary>
diff --git a/src/SMAPI/Framework/ModLoading/IInstructionHandler.cs b/src/SMAPI/Framework/ModLoading/IInstructionHandler.cs
index 126504e3..d41732f8 100644
--- a/src/SMAPI/Framework/ModLoading/IInstructionHandler.cs
+++ b/src/SMAPI/Framework/ModLoading/IInstructionHandler.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using Mono.Cecil;
diff --git a/src/SMAPI/Framework/ModLoading/IncompatibleInstructionException.cs b/src/SMAPI/Framework/ModLoading/IncompatibleInstructionException.cs
index 29406f2a..1f9add30 100644
--- a/src/SMAPI/Framework/ModLoading/IncompatibleInstructionException.cs
+++ b/src/SMAPI/Framework/ModLoading/IncompatibleInstructionException.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Framework.ModLoading
diff --git a/src/SMAPI/Framework/ModLoading/PlatformAssemblyMap.cs b/src/SMAPI/Framework/ModLoading/PlatformAssemblyMap.cs
index 0898f095..d4366294 100644
--- a/src/SMAPI/Framework/ModLoading/PlatformAssemblyMap.cs
+++ b/src/SMAPI/Framework/ModLoading/PlatformAssemblyMap.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs b/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
index 20a30f8f..67569424 100644
--- a/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
+++ b/src/SMAPI/Framework/ModLoading/RewriteFacades/SpriteBatchFacade.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Diagnostics.CodeAnalysis;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -20,7 +18,8 @@ namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
** Public methods
*********/
/// <summary>Construct an instance.</summary>
- public SpriteBatchFacade(GraphicsDevice graphicsDevice) : base(graphicsDevice) { }
+ public SpriteBatchFacade(GraphicsDevice graphicsDevice)
+ : base(graphicsDevice) { }
/****
diff --git a/src/SMAPI/Framework/ModLoading/Rewriters/ArchitectureAssemblyRewriter.cs b/src/SMAPI/Framework/ModLoading/Rewriters/ArchitectureAssemblyRewriter.cs
index 4985d72a..cc830216 100644
--- a/src/SMAPI/Framework/ModLoading/Rewriters/ArchitectureAssemblyRewriter.cs
+++ b/src/SMAPI/Framework/ModLoading/Rewriters/ArchitectureAssemblyRewriter.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using Mono.Cecil;
using StardewModdingAPI.Framework.ModLoading.Framework;
diff --git a/src/SMAPI/Framework/ModLoading/Symbols/SymbolReader.cs b/src/SMAPI/Framework/ModLoading/Symbols/SymbolReader.cs
index 55b7e0c8..2171895d 100644
--- a/src/SMAPI/Framework/ModLoading/Symbols/SymbolReader.cs
+++ b/src/SMAPI/Framework/ModLoading/Symbols/SymbolReader.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Cil;
diff --git a/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs b/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
index c2ac4cd6..8f7e05d1 100644
--- a/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
+++ b/src/SMAPI/Framework/ModLoading/Symbols/SymbolWriterProvider.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Cil;
diff --git a/src/SMAPI/Framework/Monitor.cs b/src/SMAPI/Framework/Monitor.cs
index de145d1d..6b53daff 100644
--- a/src/SMAPI/Framework/Monitor.cs
+++ b/src/SMAPI/Framework/Monitor.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Framework/Networking/SGalaxyNetClient.cs b/src/SMAPI/Framework/Networking/SGalaxyNetClient.cs
index 8e19b4a7..01095c66 100644
--- a/src/SMAPI/Framework/Networking/SGalaxyNetClient.cs
+++ b/src/SMAPI/Framework/Networking/SGalaxyNetClient.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using Galaxy.Api;
using StardewValley.Network;
diff --git a/src/SMAPI/Framework/Networking/SGalaxyNetServer.cs b/src/SMAPI/Framework/Networking/SGalaxyNetServer.cs
index 07a004a2..71e11576 100644
--- a/src/SMAPI/Framework/Networking/SGalaxyNetServer.cs
+++ b/src/SMAPI/Framework/Networking/SGalaxyNetServer.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
diff --git a/src/SMAPI/Framework/Networking/SLidgrenClient.cs b/src/SMAPI/Framework/Networking/SLidgrenClient.cs
index ecf18cbd..39876744 100644
--- a/src/SMAPI/Framework/Networking/SLidgrenClient.cs
+++ b/src/SMAPI/Framework/Networking/SLidgrenClient.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using StardewValley.Network;
diff --git a/src/SMAPI/Framework/Networking/SLidgrenServer.cs b/src/SMAPI/Framework/Networking/SLidgrenServer.cs
index c0b247c8..ff871e64 100644
--- a/src/SMAPI/Framework/Networking/SLidgrenServer.cs
+++ b/src/SMAPI/Framework/Networking/SLidgrenServer.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
diff --git a/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs b/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs
index 4c49e219..40adde8e 100644
--- a/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs
+++ b/src/SMAPI/Framework/Reflection/InterfaceProxyFactory.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Reflection;
using System.Reflection.Emit;
using Nanoray.Pintail;
diff --git a/src/SMAPI/Framework/SChatBox.cs b/src/SMAPI/Framework/SChatBox.cs
index d6286c12..e000d1cd 100644
--- a/src/SMAPI/Framework/SChatBox.cs
+++ b/src/SMAPI/Framework/SChatBox.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using StardewValley;
using StardewValley.Menus;
diff --git a/src/SMAPI/Framework/SGameRunner.cs b/src/SMAPI/Framework/SGameRunner.cs
index dae314af..213fe561 100644
--- a/src/SMAPI/Framework/SGameRunner.cs
+++ b/src/SMAPI/Framework/SGameRunner.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
using System.Linq;
@@ -150,7 +148,7 @@ namespace StardewModdingAPI.Framework
/// <summary>Update metadata when a split screen is added or removed.</summary>
private void UpdateForSplitScreenChanges()
{
- HashSet<int> oldScreenIds = new HashSet<int>(Context.ActiveScreenIds);
+ HashSet<int> oldScreenIds = new(Context.ActiveScreenIds);
// track active screens
Context.ActiveScreenIds.Clear();
diff --git a/src/SMAPI/Framework/Singleton.cs b/src/SMAPI/Framework/Singleton.cs
index da16c48e..1bf318c4 100644
--- a/src/SMAPI/Framework/Singleton.cs
+++ b/src/SMAPI/Framework/Singleton.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework
{
/// <summary>Provides singleton instances of a given type.</summary>
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/BaseDisposableWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/BaseDisposableWatcher.cs
index 03bf84d9..60006c51 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/BaseDisposableWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/BaseDisposableWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs
index 52e1dbad..256370ce 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ComparableListWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using System.Linq;
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs
index 94ce0c8e..84340fbf 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/ImmutableCollectionWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs
index e662c433..676c9fb4 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetCollectionWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using Netcode;
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs
index a97e754c..0b4d3030 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetListWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
using Netcode;
using StardewModdingAPI.Framework.StateTracking.Comparers;
diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs
index 26641750..48d5d681 100644
--- a/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/NetValueWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using Netcode;
namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
diff --git a/src/SMAPI/Framework/StateTracking/ICollectionWatcher.cs b/src/SMAPI/Framework/StateTracking/ICollectionWatcher.cs
index 74c9313b..7a7759e3 100644
--- a/src/SMAPI/Framework/StateTracking/ICollectionWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/ICollectionWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.StateTracking
diff --git a/src/SMAPI/Framework/StateTracking/IDictionaryWatcher.cs b/src/SMAPI/Framework/StateTracking/IDictionaryWatcher.cs
index 81fb7460..691ed377 100644
--- a/src/SMAPI/Framework/StateTracking/IDictionaryWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/IDictionaryWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.StateTracking
diff --git a/src/SMAPI/Framework/StateTracking/IValueWatcher.cs b/src/SMAPI/Framework/StateTracking/IValueWatcher.cs
index 7d46053c..4afca972 100644
--- a/src/SMAPI/Framework/StateTracking/IValueWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/IValueWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
namespace StardewModdingAPI.Framework.StateTracking
{
/// <summary>A watcher which tracks changes to a value.</summary>
diff --git a/src/SMAPI/Framework/StateTracking/IWatcher.cs b/src/SMAPI/Framework/StateTracking/IWatcher.cs
index 3603b6f8..8c7fa51c 100644
--- a/src/SMAPI/Framework/StateTracking/IWatcher.cs
+++ b/src/SMAPI/Framework/StateTracking/IWatcher.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
namespace StardewModdingAPI.Framework.StateTracking
diff --git a/src/SMAPI/Framework/Utilities/ContextHash.cs b/src/SMAPI/Framework/Utilities/ContextHash.cs
index 46b9099e..6c0fdc90 100644
--- a/src/SMAPI/Framework/Utilities/ContextHash.cs
+++ b/src/SMAPI/Framework/Utilities/ContextHash.cs
@@ -1,5 +1,3 @@
-#nullable disable
-
using System;
using System.Collections.Generic;