From 8e0d1b8682f0898e941fee16c6649f1165fde499 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 24 Sep 2017 02:25:35 -0400 Subject: minor bug fixes (#361) --- src/StardewModdingAPI/Framework/Serialisation/SFieldConverter.cs | 2 +- src/StardewModdingAPI/Program.cs | 2 +- src/StardewModdingAPI/StardewModdingAPI.config.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/StardewModdingAPI/Framework/Serialisation/SFieldConverter.cs b/src/StardewModdingAPI/Framework/Serialisation/SFieldConverter.cs index ffece081..917c950d 100644 --- a/src/StardewModdingAPI/Framework/Serialisation/SFieldConverter.cs +++ b/src/StardewModdingAPI/Framework/Serialisation/SFieldConverter.cs @@ -97,7 +97,7 @@ namespace StardewModdingAPI.Framework.Serialisation foreach (JProperty property in JObject.Load(reader).Properties()) { string range = property.Name; - ModStatus status = property.Value.Value(nameof(ModCompatibility.Status)); + ModStatus status = (ModStatus)Enum.Parse(typeof(ModStatus), property.Value.Value(nameof(ModCompatibility.Status))); string reasonPhrase = property.Value.Value(nameof(ModCompatibility.ReasonPhrase)); result.Add(new ModCompatibility(range, status, reasonPhrase)); diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index f821b559..fcfa1efc 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -642,7 +642,7 @@ namespace StardewModdingAPI Assembly modAssembly; try { - modAssembly = modAssemblyLoader.Load(metadata, assemblyPath, assumeCompatible: metadata.DataRecord.GetCompatibility(metadata.Manifest.Version)?.Status == ModStatus.AssumeCompatible); + modAssembly = modAssemblyLoader.Load(metadata, assemblyPath, assumeCompatible: metadata.DataRecord?.GetCompatibility(metadata.Manifest.Version)?.Status == ModStatus.AssumeCompatible); } catch (IncompatibleInstructionException ex) { diff --git a/src/StardewModdingAPI/StardewModdingAPI.config.json b/src/StardewModdingAPI/StardewModdingAPI.config.json index 3844b8b0..75b884f5 100644 --- a/src/StardewModdingAPI/StardewModdingAPI.config.json +++ b/src/StardewModdingAPI/StardewModdingAPI.config.json @@ -58,7 +58,7 @@ This file contains advanced configuration for SMAPI. You generally shouldn't cha "ID": "1e36d4ca-c7ef-4dfb-9927-d27a6c3c8bdc", "UpdateUrls": [ "http://community.playstarbound.com/resources/3532", "http://stardewvalleywiki.com/Modding:SMAPI_2.0" ], "Compatibility": { - "~0.01": { "Status": "AssumeBroken" } // broke in SMAPI 1.9 + "~0.1": { "Status": "AssumeBroken" } // broke in SMAPI 1.9 } }, { -- cgit