summaryrefslogtreecommitdiff
path: root/src/SMAPI/Constants.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 10:39:54 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-22 10:39:54 -0500
commit03c3ab3711c18f6b2bedfd02932b47bf368e1b82 (patch)
tree41a4edfe620f7f7ac9f755a8adbad7f3b583d22e /src/SMAPI/Constants.cs
parentf19722e021c277551d10561116d0b772a8f8d6c4 (diff)
downloadSMAPI-03c3ab3711c18f6b2bedfd02932b47bf368e1b82.tar.gz
SMAPI-03c3ab3711c18f6b2bedfd02932b47bf368e1b82.tar.bz2
SMAPI-03c3ab3711c18f6b2bedfd02932b47bf368e1b82.zip
update SMAPI/game version mapping, add older versions
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r--src/SMAPI/Constants.cs53
1 files changed, 43 insertions, 10 deletions
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>