diff --git a/build/GlobalAssemblyInfo.cs b/build/GlobalAssemblyInfo.cs
index bcfdc124..79d473e6 100644
--- a/build/GlobalAssemblyInfo.cs
+++ b/build/GlobalAssemblyInfo.cs
@@ -2,5 +2,5 @@ using System.Reflection;
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("2.3.0.0")]
-[assembly: AssemblyFileVersion("2.3.0.0")]
+[assembly: AssemblyVersion("2.4.0.0")]
+[assembly: AssemblyFileVersion("2.4.0.0")]
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 165e7d4e..9c1fbf93 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,4 +1,29 @@
# Release notes
+## 2.4
+* For players:
+ * Fixed visual map glitch in rare cases.
+ * Fixed error parsing JSON files which have curly quotes.
+ * Fixed error parsing some JSON files generated on another system.
+ * Fixed error parsing some JSON files after mods reload core assemblies, which is no longer allowed.
+ * Fixed intermittent errors (e.g. 'collection has been modified') with some mods when loading a save.
+ * Fixed compatibility with Linux Terminator terminal.
+
+* For the [log parser][]:
+ * Fixed error parsing logs with zero installed mods.
+
+* For modders:
+ * Added `SaveEvents.BeforeCreate` and `AfterCreate` events.
+ * Added `SButton` `IsActionButton()` and `IsUseToolButton()` extensions.
+ * Improved JSON parse errors to provide more useful info for troubleshooting.
+ * Fixed events being raised while the game is loading a save file.
+ * Fixed input events not recognising controller input as an action or use-tool button.
+ * Fixed input events setting the same `IsActionButton` and `IsUseToolButton` values for all buttons pressed in an update tick.
+ * Fixed semantic versions ignoring `-0` as a prerelease tag.
+ * Updated Json.NET to 11.0.1-beta3 (needed to avoid a parser edge case).
+
+* For SMAPI developers:
+ * Overhauled input handling to support future input events.
+
## 2.3
* For players:
* Added a user-friendly [download page](https://smapi.io).
diff --git a/src/SMAPI.Common/SemanticVersionImpl.cs b/src/SMAPI.Common/SemanticVersionImpl.cs
index 53cf5a21..1c713b47 100644
--- a/src/SMAPI.Common/SemanticVersionImpl.cs
+++ b/src/SMAPI.Common/SemanticVersionImpl.cs
@@ -190,9 +190,7 @@ namespace StardewModdingAPI.Common
private string GetNormalisedTag(string tag)
{
tag = tag?.Trim();
- if (string.IsNullOrWhiteSpace(tag) || tag == "0") // '0' from incorrect examples in old SMAPI documentation
- return null;
- return tag;
+ return !string.IsNullOrWhiteSpace(tag) ? tag : null;
}
}
}
diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets
index c0319e22..83f0dcbd 100644
--- a/src/SMAPI.ModBuildConfig/build/smapi.targets
+++ b/src/SMAPI.ModBuildConfig/build/smapi.targets
@@ -122,8 +122,8 @@
-
-
+
+
diff --git a/src/SMAPI.Mods.ConsoleCommands/StardewModdingAPI.Mods.ConsoleCommands.csproj b/src/SMAPI.Mods.ConsoleCommands/StardewModdingAPI.Mods.ConsoleCommands.csproj
index a65ad72c..a5b89a33 100644
--- a/src/SMAPI.Mods.ConsoleCommands/StardewModdingAPI.Mods.ConsoleCommands.csproj
+++ b/src/SMAPI.Mods.ConsoleCommands/StardewModdingAPI.Mods.ConsoleCommands.csproj
@@ -36,8 +36,8 @@
x86
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.11.0.1-beta3\lib\net45\Newtonsoft.Json.dll
False
diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json
index 06ab1b54..fc5ce35d 100644
--- a/src/SMAPI.Mods.ConsoleCommands/manifest.json
+++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json
@@ -1,12 +1,7 @@
{
"Name": "Console Commands",
"Author": "SMAPI",
- "Version": {
- "MajorVersion": 2,
- "MinorVersion": 3,
- "PatchVersion": 0,
- "Build": null
- },
+ "Version": "2.4.0",
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll"
diff --git a/src/SMAPI.Mods.ConsoleCommands/packages.config b/src/SMAPI.Mods.ConsoleCommands/packages.config
index ee51c237..a0f76c34 100644
--- a/src/SMAPI.Mods.ConsoleCommands/packages.config
+++ b/src/SMAPI.Mods.ConsoleCommands/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/src/SMAPI.Tests/StardewModdingAPI.Tests.csproj b/src/SMAPI.Tests/StardewModdingAPI.Tests.csproj
index c7a67306..6e7fa1f0 100644
--- a/src/SMAPI.Tests/StardewModdingAPI.Tests.csproj
+++ b/src/SMAPI.Tests/StardewModdingAPI.Tests.csproj
@@ -36,8 +36,8 @@
..\packages\Moq.4.7.142\lib\net45\Moq.dll
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
+
+ ..\packages\Newtonsoft.Json.11.0.1-beta3\lib\net45\Newtonsoft.Json.dll
..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll
diff --git a/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs b/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
index d3e0988e..f1a72012 100644
--- a/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
+++ b/src/SMAPI.Tests/Utilities/SemanticVersionTests.cs
@@ -33,6 +33,7 @@ namespace StardewModdingAPI.Tests.Utilities
[TestCase(3000, 4000, 5000, null, ExpectedResult = "3000.4000.5000")]
[TestCase(1, 2, 3, "", ExpectedResult = "1.2.3")]
[TestCase(1, 2, 3, " ", ExpectedResult = "1.2.3")]
+ [TestCase(1, 2, 3, "0", ExpectedResult = "1.2.3-0")]
[TestCase(1, 2, 3, "some-tag.4", ExpectedResult = "1.2.3-some-tag.4")]
[TestCase(1, 2, 3, "some-tag.4 ", ExpectedResult = "1.2.3-some-tag.4")]
public string Constructor_FromParts(int major, int minor, int patch, string tag)
@@ -270,6 +271,22 @@ namespace StardewModdingAPI.Tests.Utilities
Assert.IsTrue(version.IsOlderThan(new SemanticVersion("1.2.30")), "The game version should be considered older than the later semantic versions.");
}
+ /****
+ ** LegacyManifestVersion
+ ****/
+ [Test(Description = "Assert that the LegacyManifestVersion subclass correctly parses legacy manifest versions.")]
+ [TestCase(1, 0, 0, null, ExpectedResult = "1.0")]
+ [TestCase(3000, 4000, 5000, null, ExpectedResult = "3000.4000.5000")]
+ [TestCase(1, 2, 3, "", ExpectedResult = "1.2.3")]
+ [TestCase(1, 2, 3, " ", ExpectedResult = "1.2.3")]
+ [TestCase(1, 2, 3, "0", ExpectedResult = "1.2.3")] // special case: drop '0' tag for legacy manifest versions
+ [TestCase(1, 2, 3, "some-tag.4", ExpectedResult = "1.2.3-some-tag.4")]
+ [TestCase(1, 2, 3, "some-tag.4 ", ExpectedResult = "1.2.3-some-tag.4")]
+ public string LegacyManifestVersion(int major, int minor, int patch, string tag)
+ {
+ return new LegacyManifestVersion(major, minor, patch, tag).ToString();
+ }
+
/*********
** Private methods
diff --git a/src/SMAPI.Tests/packages.config b/src/SMAPI.Tests/packages.config
index 7a91e807..498325d6 100644
--- a/src/SMAPI.Tests/packages.config
+++ b/src/SMAPI.Tests/packages.config
@@ -2,6 +2,6 @@
-
+
\ No newline at end of file
diff --git a/src/SMAPI.Web/Views/Index/Index.cshtml b/src/SMAPI.Web/Views/Index/Index.cshtml
index 2d76cc15..ad58898e 100644
--- a/src/SMAPI.Web/Views/Index/Index.cshtml
+++ b/src/SMAPI.Web/Views/Index/Index.cshtml
@@ -62,7 +62,7 @@
For mod creators
diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml
index b7724c69..1659de8f 100644
--- a/src/SMAPI.Web/Views/LogParser/Index.cshtml
+++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml
@@ -3,9 +3,9 @@
}
@model StardewModdingAPI.Web.ViewModels.LogParserModel
@section Head {
-
+
-
+