summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-17 23:48:57 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-02-17 23:48:57 -0500
commitda49c7c13bbb0e47aa07f9c793640559c123ee3c (patch)
tree1bb0df273c132ecf407fd1fe1ad9b13694eba4ec /src/SMAPI.Web/Framework
parent6294b2731786d9110cd998d6ce503f11e0cfd167 (diff)
downloadSMAPI-da49c7c13bbb0e47aa07f9c793640559c123ee3c.tar.gz
SMAPI-da49c7c13bbb0e47aa07f9c793640559c123ee3c.tar.bz2
SMAPI-da49c7c13bbb0e47aa07f9c793640559c123ee3c.zip
move hardcoded SMAPI update check logic into config
Diffstat (limited to 'src/SMAPI.Web/Framework')
-rw-r--r--src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs15
-rw-r--r--src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs3
2 files changed, 18 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs
new file mode 100644
index 00000000..f382d7b5
--- /dev/null
+++ b/src/SMAPI.Web/Framework/ConfigModels/ModOverrideConfig.cs
@@ -0,0 +1,15 @@
+namespace StardewModdingAPI.Web.Framework.ConfigModels
+{
+ /// <summary>Override update-check metadata for a mod.</summary>
+ internal class ModOverrideConfig
+ {
+ /// <summary>The unique ID from the mod's manifest.</summary>
+ public string ID { get; set; }
+
+ /// <summary>Whether to allow non-standard versions.</summary>
+ public bool AllowNonStandardVersions { get; set; }
+
+ /// <summary>The mod page URL to use regardless of which site has the update, or <c>null</c> to use the site URL.</summary>
+ public string SetUrl { get; set; }
+ }
+}
diff --git a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs
index 46073eb8..bd58dba0 100644
--- a/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs
+++ b/src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs
@@ -11,5 +11,8 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels
/// <summary>The number of minutes failed update checks should be cached before refetching them.</summary>
public int ErrorCacheMinutes { get; set; }
+
+ /// <summary>Update-check metadata to override.</summary>
+ public ModOverrideConfig[] ModOverrides { get; set; }
}
}