diff options
-rw-r--r-- | docs/release-notes.md | 2 | ||||
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs | 2 | ||||
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs | 3 | ||||
-rw-r--r-- | src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs | 5 | ||||
-rw-r--r-- | src/SMAPI.Web/ViewModels/ModModel.cs | 4 | ||||
-rw-r--r-- | src/SMAPI.Web/Views/Mods/Index.cshtml | 2 |
6 files changed, 17 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index c07ae750..bc5e5a89 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -26,7 +26,7 @@ These changes have not been released yet. * For the mod compatibility list: * Clicking a mod link now automatically adds it to the visible mods when the list is filtered. - * Added metadata links to advanced info, if any. + * Added metadata links and dev notes (if any) to advanced info. * For modders: * Mods are now loaded much earlier in the game launch. This lets mods intercept any content asset, but the game is not fully initialised when `Entry` is called (use the `GameLaunched` event if you need to run code when the game is initialised). diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs index 24aea5e8..ab6a2517 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs @@ -99,6 +99,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki string customUrl = this.GetAttribute(node, "data-url"); string anchor = this.GetAttribute(node, "id"); string contentPackFor = this.GetAttribute(node, "data-content-pack-for"); + string devNote = this.GetAttribute(node, "data-dev-note"); // parse stable compatibility WikiCompatibilityInfo compatibility = new WikiCompatibilityInfo @@ -153,6 +154,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki BetaCompatibility = betaCompatibility, Warnings = warnings, MetadataLinks = metadataLinks.ToArray(), + DevNote = devNote, Anchor = anchor }; } diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs index 556796c5..fff86891 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs @@ -54,6 +54,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki /// <summary>Extra metadata links (usually for open pull requests).</summary> public Tuple<Uri, string>[] MetadataLinks { get; set; } + /// <summary>Special notes intended for developers who maintain unofficial updates or submit pull requests. </summary> + public string DevNote { get; set; } + /// <summary>The link anchor for the mod entry in the wiki compatibility list.</summary> public string Anchor { get; set; } } diff --git a/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs b/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs index 850272eb..bf1e2be2 100644 --- a/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs +++ b/src/SMAPI.Web/Framework/Caching/Wiki/CachedWikiMod.cs @@ -61,6 +61,9 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki /// <summary>Extra metadata links (usually for open pull requests).</summary> public Tuple<Uri, string>[] MetadataLinks { get; set; } + /// <summary>Special notes intended for developers who maintain unofficial updates or submit pull requests. </summary> + public string DevNote { get; set; } + /// <summary>The link anchor for the mod entry in the wiki compatibility list.</summary> public string Anchor { get; set; } @@ -127,6 +130,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki this.ContentPackFor = mod.ContentPackFor; this.MetadataLinks = mod.MetadataLinks; this.Warnings = mod.Warnings; + this.DevNote = mod.DevNote; this.Anchor = mod.Anchor; // stable compatibility @@ -161,6 +165,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Wiki ContentPackFor = this.ContentPackFor, Warnings = this.Warnings, MetadataLinks = this.MetadataLinks, + DevNote = this.DevNote, Anchor = this.Anchor, // stable compatibility diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs index b57e03f8..5a343640 100644 --- a/src/SMAPI.Web/ViewModels/ModModel.cs +++ b/src/SMAPI.Web/ViewModels/ModModel.cs @@ -41,6 +41,9 @@ namespace StardewModdingAPI.Web.ViewModels /// <summary>Extra metadata links (usually for open pull requests).</summary> public Tuple<Uri, string>[] MetadataLinks { get; set; } + /// <summary>Special notes intended for developers who maintain unofficial updates or submit pull requests. </summary> + public string DevNote { get; set; } + /// <summary>A unique identifier for the mod that can be used in an anchor URL.</summary> public string Slug { get; set; } @@ -66,6 +69,7 @@ namespace StardewModdingAPI.Web.ViewModels this.ModPages = this.GetModPageUrls(entry).ToArray(); this.Warnings = entry.Warnings; this.MetadataLinks = entry.MetadataLinks; + this.DevNote = entry.DevNote; this.Slug = entry.Anchor; } diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml index 2bc135c3..2d45a64d 100644 --- a/src/SMAPI.Web/Views/Mods/Index.cshtml +++ b/src/SMAPI.Web/Views/Mods/Index.cshtml @@ -98,6 +98,8 @@ <template v-for="(link, i) in mod.MetadataLinks"> <a v-bind:href="link.Item1">{{link.Item2}}</a> </template> + + <abbr v-bind:title="mod.DevNote" v-show="mod.DevNote">[dev note]</abbr> </span> </small> </td> |