summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/SMAPI/Program.cs2
-rw-r--r--src/StardewModdingAPI.Toolkit/ModToolkit.cs7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs
index 6f1fe761..150ed34a 100644
--- a/src/SMAPI/Program.cs
+++ b/src/SMAPI/Program.cs
@@ -415,7 +415,7 @@ namespace StardewModdingAPI
// load mod data
ModToolkit toolkit = new ModToolkit();
- ModDatabase modDatabase = toolkit.GetModDatabase(Constants.ApiMetadataPath, toolkit.GetUpdateUrl);
+ ModDatabase modDatabase = toolkit.GetModDatabase(Constants.ApiMetadataPath);
// load mods
{
diff --git a/src/StardewModdingAPI.Toolkit/ModToolkit.cs b/src/StardewModdingAPI.Toolkit/ModToolkit.cs
index 7b678f3d..18fe1ff3 100644
--- a/src/StardewModdingAPI.Toolkit/ModToolkit.cs
+++ b/src/StardewModdingAPI.Toolkit/ModToolkit.cs
@@ -46,17 +46,16 @@ namespace StardewModdingAPI.Toolkit
/// <summary>Get SMAPI's internal mod database.</summary>
/// <param name="metadataPath">The file path for the SMAPI metadata file.</param>
- /// <param name="getUpdateUrl">Get an update URL for an update key (if valid).</param>
- public ModDatabase GetModDatabase(string metadataPath, Func<string, string> getUpdateUrl)
+ public ModDatabase GetModDatabase(string metadataPath)
{
MetadataModel metadata = JsonConvert.DeserializeObject<MetadataModel>(File.ReadAllText(metadataPath));
ModDataRecord[] records = metadata.ModData.Select(pair => new ModDataRecord(pair.Key, pair.Value)).ToArray();
- return new ModDatabase(records, getUpdateUrl);
+ return new ModDatabase(records, this.GetUpdateUrl);
}
/// <summary>Get an update URL for an update key (if valid).</summary>
/// <param name="updateKey">The update key.</param>
- internal string GetUpdateUrl(string updateKey)
+ public string GetUpdateUrl(string updateKey)
{
string[] parts = updateKey.Split(new[] { ':' }, 2);
if (parts.Length != 2)