diff options
Diffstat (limited to 'src/StardewModdingAPI/Framework/Models')
-rw-r--r-- | src/StardewModdingAPI/Framework/Models/ModCompatibility.cs (renamed from src/StardewModdingAPI/Framework/Models/IncompatibleMod.cs) | 10 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/Models/ModCompatibilityType.cs | 12 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/Models/SConfig.cs | 4 |
3 files changed, 19 insertions, 7 deletions
diff --git a/src/StardewModdingAPI/Framework/Models/IncompatibleMod.cs b/src/StardewModdingAPI/Framework/Models/ModCompatibility.cs index 29e18ddb..1e71dae0 100644 --- a/src/StardewModdingAPI/Framework/Models/IncompatibleMod.cs +++ b/src/StardewModdingAPI/Framework/Models/ModCompatibility.cs @@ -3,8 +3,8 @@ using Newtonsoft.Json; namespace StardewModdingAPI.Framework.Models { - /// <summary>Contains abstract metadata about an incompatible mod.</summary> - internal class IncompatibleMod + /// <summary>Metadata about a mod version that SMAPI should assume is compatible or broken, regardless of whether it detects incompatible code.</summary> + internal class ModCompatibility { /********* ** Accessors @@ -30,13 +30,13 @@ namespace StardewModdingAPI.Framework.Models /// <summary>The URL the user can check for an unofficial updated version.</summary> public string UnofficialUpdateUrl { get; set; } - /// <summary>A regular expression matching version strings to consider compatible, even if they technically precede <see cref="UpperVersion"/>.</summary> - public string ForceCompatibleVersion { get; set; } - /// <summary>The reason phrase to show in the warning, or <c>null</c> to use the default value.</summary> /// <example>"this version is incompatible with the latest version of the game"</example> public string ReasonPhrase { get; set; } + /// <summary>Indicates how SMAPI should consider the mod.</summary> + public ModCompatibilityType Compatibility { get; set; } + /**** ** Injected diff --git a/src/StardewModdingAPI/Framework/Models/ModCompatibilityType.cs b/src/StardewModdingAPI/Framework/Models/ModCompatibilityType.cs new file mode 100644 index 00000000..35edec5e --- /dev/null +++ b/src/StardewModdingAPI/Framework/Models/ModCompatibilityType.cs @@ -0,0 +1,12 @@ +namespace StardewModdingAPI.Framework.Models +{ + /// <summary>Indicates how SMAPI should consider a mod.</summary> + internal enum ModCompatibilityType + { + /// <summary>Assume the mod is not compatible, even if SMAPI doesn't detect any incompatible code.</summary> + AssumeBroken = 0, + + /// <summary>Assume the mod is compatible, even if SMAPI detects incompatible code.</summary> + AssumeCompatible = 1 + } +} diff --git a/src/StardewModdingAPI/Framework/Models/SConfig.cs b/src/StardewModdingAPI/Framework/Models/SConfig.cs index 558da82a..0de96297 100644 --- a/src/StardewModdingAPI/Framework/Models/SConfig.cs +++ b/src/StardewModdingAPI/Framework/Models/SConfig.cs @@ -12,7 +12,7 @@ /// <summary>Whether to check if a newer version of SMAPI is available on startup.</summary> public bool CheckForUpdates { get; set; } = true; - /// <summary>A list of mod versions which should be considered incompatible.</summary> - public IncompatibleMod[] IncompatibleMods { get; set; } + /// <summary>A list of mod versions which should be considered compatible or incompatible regardless of whether SMAPI detects incompatible code.</summary> + public ModCompatibility[] ModCompatibility { get; set; } } } |