update game version parsing for upcoming SMAPI 2.6 beta (#453)
This commit is contained in:
parent
83f89c6ef3
commit
b7edf31c25
|
@ -41,7 +41,7 @@ namespace StardewModdingAPI
|
|||
public static ISemanticVersion ApiVersion { get; } = new SemanticVersion("2.6-beta");
|
||||
|
||||
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
||||
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.0.38");
|
||||
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.1");
|
||||
|
||||
/// <summary>The maximum supported version of Stardew Valley.</summary>
|
||||
public static ISemanticVersion MaximumGameVersion { get; } = null;
|
||||
|
|
|
@ -49,9 +49,6 @@ namespace StardewModdingAPI.Framework
|
|||
/// <param name="gameVersion">The game version string.</param>
|
||||
private static string GetSemanticVersionString(string gameVersion)
|
||||
{
|
||||
if (gameVersion.StartsWith("1.3.0."))
|
||||
return new SemanticVersion(1, 3, 0, "alpha." + gameVersion.Substring("1.3.0.".Length)).ToString();
|
||||
|
||||
return GameVersion.VersionMap.TryGetValue(gameVersion, out string semanticVersion)
|
||||
? semanticVersion
|
||||
: gameVersion;
|
||||
|
@ -61,9 +58,6 @@ namespace StardewModdingAPI.Framework
|
|||
/// <param name="semanticVersion">The semantic version string.</param>
|
||||
private static string GetGameVersionString(string semanticVersion)
|
||||
{
|
||||
if (semanticVersion.StartsWith("1.3-alpha."))
|
||||
return "1.3.0." + semanticVersion.Substring("1.3-alpha.".Length);
|
||||
|
||||
foreach (var mapping in GameVersion.VersionMap)
|
||||
{
|
||||
if (mapping.Value.Equals(semanticVersion, StringComparison.InvariantCultureIgnoreCase))
|
||||
|
|
Loading…
Reference in New Issue