From e58e8a22836081ec4baffa5a9b4b093a329f3d88 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 7 Apr 2022 01:38:02 -0400 Subject: enable nullable annotations for manifests (#837) --- src/SMAPI.Toolkit.CoreInterfaces/IManifest.cs | 8 +++----- src/SMAPI.Toolkit.CoreInterfaces/IManifestContentPackFor.cs | 4 +--- src/SMAPI.Toolkit.CoreInterfaces/IManifestDependency.cs | 4 +--- 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/SMAPI.Toolkit.CoreInterfaces') diff --git a/src/SMAPI.Toolkit.CoreInterfaces/IManifest.cs b/src/SMAPI.Toolkit.CoreInterfaces/IManifest.cs index a9251446..ee6cc0b6 100644 --- a/src/SMAPI.Toolkit.CoreInterfaces/IManifest.cs +++ b/src/SMAPI.Toolkit.CoreInterfaces/IManifest.cs @@ -1,5 +1,3 @@ -#nullable disable - using System.Collections.Generic; namespace StardewModdingAPI @@ -23,16 +21,16 @@ namespace StardewModdingAPI ISemanticVersion Version { get; } /// The minimum SMAPI version required by this mod, if any. - ISemanticVersion MinimumApiVersion { get; } + ISemanticVersion? MinimumApiVersion { get; } /// The unique mod ID. string UniqueID { get; } /// The name of the DLL in the directory that has the Entry method. Mutually exclusive with . - string EntryDll { get; } + string? EntryDll { get; } /// The mod which will read this as a content pack. Mutually exclusive with . - IManifestContentPackFor ContentPackFor { get; } + IManifestContentPackFor? ContentPackFor { get; } /// The other mods that must be loaded before this mod. IManifestDependency[] Dependencies { get; } diff --git a/src/SMAPI.Toolkit.CoreInterfaces/IManifestContentPackFor.cs b/src/SMAPI.Toolkit.CoreInterfaces/IManifestContentPackFor.cs index d898b716..52ac8f1c 100644 --- a/src/SMAPI.Toolkit.CoreInterfaces/IManifestContentPackFor.cs +++ b/src/SMAPI.Toolkit.CoreInterfaces/IManifestContentPackFor.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace StardewModdingAPI { /// Indicates which mod can read the content pack represented by the containing manifest. @@ -9,6 +7,6 @@ namespace StardewModdingAPI string UniqueID { get; } /// The minimum required version (if any). - ISemanticVersion MinimumVersion { get; } + ISemanticVersion? MinimumVersion { get; } } } diff --git a/src/SMAPI.Toolkit.CoreInterfaces/IManifestDependency.cs b/src/SMAPI.Toolkit.CoreInterfaces/IManifestDependency.cs index 49b7aed6..58425eb2 100644 --- a/src/SMAPI.Toolkit.CoreInterfaces/IManifestDependency.cs +++ b/src/SMAPI.Toolkit.CoreInterfaces/IManifestDependency.cs @@ -1,5 +1,3 @@ -#nullable disable - namespace StardewModdingAPI { /// A mod dependency listed in a mod manifest. @@ -12,7 +10,7 @@ namespace StardewModdingAPI string UniqueID { get; } /// The minimum required version (if any). - ISemanticVersion MinimumVersion { get; } + ISemanticVersion? MinimumVersion { get; } /// Whether the dependency must be installed to use the mod. bool IsRequired { get; } -- cgit