From 691310d16e6873b83c55f62a59d5010dd8bb7e98 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 24 Feb 2018 16:52:38 -0500 Subject: add content pack support to log parser --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Web/Views') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index 8d1abbb1..20e20ee1 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -1,5 +1,10 @@ @{ ViewData["Title"] = "SMAPI log parser"; + + Dictionary contentPacks = Model.ParsedLog?.Mods + ?.GroupBy(mod => mod.ContentPackFor) + .Where(group => group.Key != null) + .ToDictionary(group => group.Key, group => group.ToArray()); } @using Newtonsoft.Json @using StardewModdingAPI.Web.Framework.LogParsing.Models @@ -69,10 +74,22 @@ show all hide all - @foreach (var mod in Model.ParsedLog.Mods) + @foreach (var mod in Model.ParsedLog.Mods.Where(p => p.ContentPackFor == null)) { + + @mod.Name + @if (contentPacks != null && contentPacks.TryGetValue(mod.Name, out LogModInfo[] contentPackList)) + { +
+ @foreach (var contentPack in contentPackList) + { + +@contentPack.Name @contentPack.Version + } +
+ } + @mod.Version @mod.Author @if (mod.Errors == 0) -- cgit