summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md1
-rw-r--r--src/SMAPI/Constants.cs53
2 files changed, 44 insertions, 10 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index ee052b63..8ea6a9ea 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -7,6 +7,7 @@
* Reduced network traffic for mod broadcasts to players who can't process them.
* Fixed update-check errors for recent versions of SMAPI on Android.
* Updated compatibility list.
+ * Updated SMAPI/game version map.
* Updated translations. Thanks to xCarloC (added Italian)!
* For the Save Backup mod:
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 201d3166..443ca7a6 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -115,26 +115,59 @@ namespace StardewModdingAPI
/// <returns>Returns the compatible SMAPI version, or <c>null</c> if none was found.</returns>
internal static ISemanticVersion GetCompatibleApiVersion(ISemanticVersion version)
{
+ // This covers all officially supported public game updates. It might seem like version
+ // ranges would be better, but the given SMAPI versions may not be compatible with
+ // intermediate unlisted versions (e.g. private beta updates).
+ //
+ // Nonstandard versions are normalized by GameVersion (e.g. 1.07 => 1.0.7).
switch (version.ToString())
{
+ case "1.4.1":
+ case "1.4.0":
+ return new SemanticVersion("3.0.1");
+
case "1.3.36":
- return new SemanticVersion(2, 11, 2);
+ return new SemanticVersion("2.11.2");
- case "1.3.32":
case "1.3.33":
- return new SemanticVersion(2, 10, 2);
+ case "1.3.32":
+ return new SemanticVersion("2.10.2");
case "1.3.28":
- return new SemanticVersion(2, 7, 0);
+ return new SemanticVersion("2.7.0");
- case "1.2.30":
- case "1.2.31":
- case "1.2.32":
case "1.2.33":
- return new SemanticVersion(2, 5, 5);
- }
+ case "1.2.32":
+ case "1.2.31":
+ case "1.2.30":
+ return new SemanticVersion("2.5.5");
+
+ case "1.2.29":
+ case "1.2.28":
+ case "1.2.27":
+ case "1.2.26":
+ return new SemanticVersion("1.13.1");
+
+ case "1.1.1":
+ case "1.1.0":
+ return new SemanticVersion("1.9.0");
+
+ case "1.0.7.1":
+ case "1.0.7":
+ case "1.0.6":
+ case "1.0.5.2":
+ case "1.0.5.1":
+ case "1.0.5":
+ case "1.0.4":
+ case "1.0.3":
+ case "1.0.2":
+ case "1.0.1":
+ case "1.0.0":
+ return new SemanticVersion("0.40.0");
- return null;
+ default:
+ return null;
+ }
}
/// <summary>Get metadata for mapping assemblies to the current platform.</summary>