diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-19 13:56:54 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-02-19 13:56:54 -0500 |
commit | 258e4c16e3d58256304854f9cd9633f0ff480375 (patch) | |
tree | ee720079a59a7120189be1af38fb80209dffc0bc | |
parent | 6cf4742bcaef633cb2f42fe2b19f8adaadb50491 (diff) | |
download | SMAPI-258e4c16e3d58256304854f9cd9633f0ff480375.tar.gz SMAPI-258e4c16e3d58256304854f9cd9633f0ff480375.tar.bz2 SMAPI-258e4c16e3d58256304854f9cd9633f0ff480375.zip |
fix default update keys not being applied (#439)
-rw-r--r-- | src/SMAPI/Framework/ModData/ParsedModDataRecord.cs | 3 | ||||
-rw-r--r-- | src/SMAPI/Framework/ModLoading/ModResolver.cs | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/ModData/ParsedModDataRecord.cs b/src/SMAPI/Framework/ModData/ParsedModDataRecord.cs index 5a6561a7..7f49790d 100644 --- a/src/SMAPI/Framework/ModData/ParsedModDataRecord.cs +++ b/src/SMAPI/Framework/ModData/ParsedModDataRecord.cs @@ -15,9 +15,6 @@ namespace StardewModdingAPI.Framework.ModData /// <summary>The update key to apply.</summary> public string UpdateKey { get; set; } - /// <summary>The mod version to apply.</summary> - public ISemanticVersion Version { get; set; } - /// <summary>The alternative URL the player can check for an updated version.</summary> public string AlternativeUrl { get; set; } diff --git a/src/SMAPI/Framework/ModLoading/ModResolver.cs b/src/SMAPI/Framework/ModLoading/ModResolver.cs index be73254d..8b4a3eb8 100644 --- a/src/SMAPI/Framework/ModLoading/ModResolver.cs +++ b/src/SMAPI/Framework/ModLoading/ModResolver.cs @@ -57,6 +57,13 @@ namespace StardewModdingAPI.Framework.ModLoading if (string.IsNullOrWhiteSpace(displayName)) displayName = modDir.FullName.Replace(rootPath, "").Trim('/', '\\'); + // apply defaults + if (manifest != null && dataRecord != null) + { + if (dataRecord.UpdateKey != null) + manifest.UpdateKeys = new[] { dataRecord.UpdateKey }; + } + // build metadata ModMetadataStatus status = error == null ? ModMetadataStatus.Found |