summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-02 15:16:24 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-02 15:16:24 -0500
commitf0a5a3d154b0c362c455fc57ee2d29111748e0f8 (patch)
tree8b8c475c575c46f255add6dcae45ab83dd16826e /src/SMAPI.Web
parent84c406ce36254d639e15cadf901f414e3c13e3d1 (diff)
downloadSMAPI-f0a5a3d154b0c362c455fc57ee2d29111748e0f8.tar.gz
SMAPI-f0a5a3d154b0c362c455fc57ee2d29111748e0f8.tar.bz2
SMAPI-f0a5a3d154b0c362c455fc57ee2d29111748e0f8.zip
add ModDrop to mod compatibility page (#604)
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs2
-rw-r--r--src/SMAPI.Web/ViewModels/ModModel.cs5
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js7
3 files changed, 14 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index d1e81c3c..12d349e0 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -294,6 +294,8 @@ namespace StardewModdingAPI.Web.Controllers
yield return $"Nexus:{entry.NexusID}";
if (entry.ChucklefishID.HasValue)
yield return $"Chucklefish:{entry.ChucklefishID}";
+ if (entry.ModDropID.HasValue)
+ yield return $"ModDrop:{entry.ModDropID}";
}
}
diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs
index 0e7d2076..5c1840fc 100644
--- a/src/SMAPI.Web/ViewModels/ModModel.cs
+++ b/src/SMAPI.Web/ViewModels/ModModel.cs
@@ -96,6 +96,11 @@ namespace StardewModdingAPI.Web.ViewModels
anyFound = true;
yield return new ModLinkModel($"https://community.playstarbound.com/resources/{entry.ChucklefishID}", "Chucklefish");
}
+ if (entry.ModDropID.HasValue)
+ {
+ anyFound = true;
+ yield return new ModLinkModel($"https://www.moddrop.com/sdv/mod/467243/{entry.ModDropID}", "ModDrop");
+ }
// fallback
if (!anyFound && !string.IsNullOrWhiteSpace(entry.CustomUrl))
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index b4dc6986..f7a8501e 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/mods.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/mods.js
@@ -73,6 +73,11 @@ smapi.modList = function (mods) {
id: "show-chucklefish",
value: true
},
+ moddrop: {
+ label: "ModDrop",
+ id: "show-moddrop",
+ value: true
+ },
nexus: {
label: "Nexus",
id: "show-nexus",
@@ -179,6 +184,8 @@ smapi.modList = function (mods) {
if (!filters.download.chucklefish.value)
ignoreSites.push("Chucklefish");
+ if (!filters.download.moddrop.value)
+ ignoreSites.push("ModDrop");
if (!filters.download.nexus.value)
ignoreSites.push("Nexus");
if (!filters.download.custom.value)