enable nullable annotations in SMAPI where no changes are needed (#837)

This commit is contained in:
Jesse Plamondon-Willard 2022-04-13 19:00:24 -04:00
parent 40aebb74c6
commit 6e9e8aef1e
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
112 changed files with 5 additions and 228 deletions

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using StardewModdingAPI.Enums;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Collections.Immutable;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Framework.Input;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Framework.Input;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Events
{
/// <summary>Manages access to events raised by SMAPI.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using StardewValley;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Enums;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using LanguageCode = StardewValley.LocalizedContentManager.LanguageCode;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Events

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework.Graphics;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.Commands
{
/// <summary>A core SMAPI console command.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Framework.Commands

View File

@ -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>

View File

@ -1,5 +1,3 @@
#nullable disable
using xTile.Dimensions;
namespace StardewModdingAPI.Framework.Content

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework
{
/// <summary>A deprecation warning for a mod.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using StardewModdingAPI.Events;
namespace StardewModdingAPI.Framework.Events

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.Events
{
/// <summary>Metadata for an event raised by SMAPI.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using StardewModdingAPI.Events;
namespace StardewModdingAPI.Framework.Events

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.Events
{
/// <summary>An internal base class for event API classes.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Framework.Exceptions

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.Input

View File

@ -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);
}

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using Microsoft.Xna.Framework.Input;

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.ModHelpers
{
/// <summary>The common base class for mod helpers.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewModdingAPI.Framework.Input;
using StardewModdingAPI.Utilities;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.IO;
using StardewModdingAPI.Events;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using StardewValley;

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework
{
/// <summary>A generic tuple which links something to a mod.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.ModLoading
{
/// <summary>Indicates the result of an assembly load.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using Mono.Cecil;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Framework.ModLoading

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -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) { }
/****

View File

@ -1,5 +1,3 @@
#nullable disable
using Mono.Cecil;
using StardewModdingAPI.Framework.ModLoading.Framework;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Cil;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.IO;
using Mono.Cecil;
using Mono.Cecil.Cil;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Galaxy.Api;
using StardewValley.Network;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using StardewValley.Network;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Reflection;
using System.Reflection.Emit;
using Nanoray.Pintail;

View File

@ -1,5 +1,3 @@
#nullable disable
using StardewValley;
using StardewValley.Menus;

View File

@ -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();

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework
{
/// <summary>Provides singleton instances of a given type.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using System.Linq;

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using Netcode;

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
using Netcode;
using StardewModdingAPI.Framework.StateTracking.Comparers;

View File

@ -1,5 +1,3 @@
#nullable disable
using Netcode;
namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.StateTracking

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
namespace StardewModdingAPI.Framework.StateTracking

View File

@ -1,5 +1,3 @@
#nullable disable
namespace StardewModdingAPI.Framework.StateTracking
{
/// <summary>A watcher which tracks changes to a value.</summary>

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
namespace StardewModdingAPI.Framework.StateTracking

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using System.Collections.Generic;

View File

@ -1,5 +1,3 @@
#nullable disable
using StardewModdingAPI.Toolkit.Utilities;
namespace StardewModdingAPI

View File

@ -1,5 +1,3 @@
#nullable disable
using System.Collections.Generic;
namespace StardewModdingAPI

View File

@ -1,5 +1,3 @@
#nullable disable
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

View File

@ -1,5 +1,3 @@
#nullable disable
using Microsoft.Xna.Framework;
using xTile;

Some files were not shown because too many files have changed in this diff Show More