add ModDrop to mod compatibility page (#604)
This commit is contained in:
parent
84c406ce36
commit
f0a5a3d154
|
@ -294,6 +294,8 @@ namespace StardewModdingAPI.Web.Controllers
|
||||||
yield return $"Nexus:{entry.NexusID}";
|
yield return $"Nexus:{entry.NexusID}";
|
||||||
if (entry.ChucklefishID.HasValue)
|
if (entry.ChucklefishID.HasValue)
|
||||||
yield return $"Chucklefish:{entry.ChucklefishID}";
|
yield return $"Chucklefish:{entry.ChucklefishID}";
|
||||||
|
if (entry.ModDropID.HasValue)
|
||||||
|
yield return $"ModDrop:{entry.ModDropID}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,11 @@ namespace StardewModdingAPI.Web.ViewModels
|
||||||
anyFound = true;
|
anyFound = true;
|
||||||
yield return new ModLinkModel($"https://community.playstarbound.com/resources/{entry.ChucklefishID}", "Chucklefish");
|
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
|
// fallback
|
||||||
if (!anyFound && !string.IsNullOrWhiteSpace(entry.CustomUrl))
|
if (!anyFound && !string.IsNullOrWhiteSpace(entry.CustomUrl))
|
||||||
|
|
|
@ -73,6 +73,11 @@ smapi.modList = function (mods) {
|
||||||
id: "show-chucklefish",
|
id: "show-chucklefish",
|
||||||
value: true
|
value: true
|
||||||
},
|
},
|
||||||
|
moddrop: {
|
||||||
|
label: "ModDrop",
|
||||||
|
id: "show-moddrop",
|
||||||
|
value: true
|
||||||
|
},
|
||||||
nexus: {
|
nexus: {
|
||||||
label: "Nexus",
|
label: "Nexus",
|
||||||
id: "show-nexus",
|
id: "show-nexus",
|
||||||
|
@ -179,6 +184,8 @@ smapi.modList = function (mods) {
|
||||||
|
|
||||||
if (!filters.download.chucklefish.value)
|
if (!filters.download.chucklefish.value)
|
||||||
ignoreSites.push("Chucklefish");
|
ignoreSites.push("Chucklefish");
|
||||||
|
if (!filters.download.moddrop.value)
|
||||||
|
ignoreSites.push("ModDrop");
|
||||||
if (!filters.download.nexus.value)
|
if (!filters.download.nexus.value)
|
||||||
ignoreSites.push("Nexus");
|
ignoreSites.push("Nexus");
|
||||||
if (!filters.download.custom.value)
|
if (!filters.download.custom.value)
|
||||||
|
|
|
@ -28,6 +28,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
|
||||||
/// <summary>The mod ID in the Chucklefish mod repo.</summary>
|
/// <summary>The mod ID in the Chucklefish mod repo.</summary>
|
||||||
public int? ChucklefishID { get; set; }
|
public int? ChucklefishID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>The mod ID in the ModDrop mod repo.</summary>
|
||||||
|
public int? ModDropID { get; set; }
|
||||||
|
|
||||||
/// <summary>The GitHub repository in the form 'owner/repo'.</summary>
|
/// <summary>The GitHub repository in the form 'owner/repo'.</summary>
|
||||||
public string GitHubRepo { get; set; }
|
public string GitHubRepo { get; set; }
|
||||||
|
|
||||||
|
@ -77,6 +80,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
|
||||||
this.Name = wiki.Name.FirstOrDefault();
|
this.Name = wiki.Name.FirstOrDefault();
|
||||||
this.NexusID = wiki.NexusID;
|
this.NexusID = wiki.NexusID;
|
||||||
this.ChucklefishID = wiki.ChucklefishID;
|
this.ChucklefishID = wiki.ChucklefishID;
|
||||||
|
this.ModDropID = wiki.ModDropID;
|
||||||
this.GitHubRepo = wiki.GitHubRepo;
|
this.GitHubRepo = wiki.GitHubRepo;
|
||||||
this.CustomSourceUrl = wiki.CustomSourceUrl;
|
this.CustomSourceUrl = wiki.CustomSourceUrl;
|
||||||
this.CustomUrl = wiki.CustomUrl;
|
this.CustomUrl = wiki.CustomUrl;
|
||||||
|
|
|
@ -93,6 +93,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
|
||||||
string[] warnings = this.GetAttributeAsCsv(node, "data-warnings");
|
string[] warnings = this.GetAttributeAsCsv(node, "data-warnings");
|
||||||
int? nexusID = this.GetAttributeAsNullableInt(node, "data-nexus-id");
|
int? nexusID = this.GetAttributeAsNullableInt(node, "data-nexus-id");
|
||||||
int? chucklefishID = this.GetAttributeAsNullableInt(node, "data-cf-id");
|
int? chucklefishID = this.GetAttributeAsNullableInt(node, "data-cf-id");
|
||||||
|
int? modDropID = this.GetAttributeAsNullableInt(node, "data-moddrop-id");
|
||||||
string githubRepo = this.GetAttribute(node, "data-github");
|
string githubRepo = this.GetAttribute(node, "data-github");
|
||||||
string customSourceUrl = this.GetAttribute(node, "data-custom-source");
|
string customSourceUrl = this.GetAttribute(node, "data-custom-source");
|
||||||
string customUrl = this.GetAttribute(node, "data-url");
|
string customUrl = this.GetAttribute(node, "data-url");
|
||||||
|
@ -133,6 +134,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
|
||||||
Author = authors,
|
Author = authors,
|
||||||
NexusID = nexusID,
|
NexusID = nexusID,
|
||||||
ChucklefishID = chucklefishID,
|
ChucklefishID = chucklefishID,
|
||||||
|
ModDropID = modDropID,
|
||||||
GitHubRepo = githubRepo,
|
GitHubRepo = githubRepo,
|
||||||
CustomSourceUrl = customSourceUrl,
|
CustomSourceUrl = customSourceUrl,
|
||||||
CustomUrl = customUrl,
|
CustomUrl = customUrl,
|
||||||
|
|
|
@ -21,6 +21,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
|
||||||
/// <summary>The mod ID in the Chucklefish mod repo.</summary>
|
/// <summary>The mod ID in the Chucklefish mod repo.</summary>
|
||||||
public int? ChucklefishID { get; set; }
|
public int? ChucklefishID { get; set; }
|
||||||
|
|
||||||
|
/// <summary>The mod ID in the ModDrop mod repo.</summary>
|
||||||
|
public int? ModDropID { get; set; }
|
||||||
|
|
||||||
/// <summary>The GitHub repository in the form 'owner/repo'.</summary>
|
/// <summary>The GitHub repository in the form 'owner/repo'.</summary>
|
||||||
public string GitHubRepo { get; set; }
|
public string GitHubRepo { get; set; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue