From 2e8c7e06c5c46834b570b667cb7497fe4cc408ac Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 20 Dec 2020 22:34:59 -0500 Subject: update for split-screen mode This includes splitting GameRunner (the main game instance) from Game1 (now a per-screen game state), adding a PerScreen utility to simplify per-screen values, adding separate per-screen input handling and events, adding new Context fields for split-screen, and logging the screen ID in split-screen mode to distinguish log entries. --- src/SMAPI.Web/Views/LogParser/Index.cshtml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/SMAPI.Web/Views/LogParser/Index.cshtml') diff --git a/src/SMAPI.Web/Views/LogParser/Index.cshtml b/src/SMAPI.Web/Views/LogParser/Index.cshtml index d4ff4f10..fd472673 100644 --- a/src/SMAPI.Web/Views/LogParser/Index.cshtml +++ b/src/SMAPI.Web/Views/LogParser/Index.cshtml @@ -13,6 +13,8 @@ .ToDictionary(level => level.ToString().ToLower(), level => level != LogLevel.Trace); string curPageUrl = this.Url.PlainAction("Index", "LogParser", new { id = Model.PasteID }, absoluteUrl: true); + + ISet screenIds = new HashSet(Model.ParsedLog?.Messages?.Select(p => p.ScreenId) ?? new int[0]); } @section Head { @@ -35,7 +37,8 @@ showMods: @this.ForJson(Model.ParsedLog?.Mods?.Select(p => Model.GetSlug(p.Name)).Distinct().ToDictionary(slug => slug, slug => true)), showSections: @this.ForJson(Enum.GetNames(typeof(LogSection)).ToDictionary(section => section, section => false)), showLevels: @this.ForJson(defaultFilters), - enableFilters: @this.ForJson(!Model.ShowRaw) + enableFilters: @this.ForJson(!Model.ShowRaw), + screenIds: @this.ForJson(screenIds) }, '@this.Url.PlainAction("Index", "LogParser", values: null)'); }); @@ -305,6 +308,10 @@ else if (Model.ParsedLog?.IsValid == true) @if (message.IsStartOfSection) { v-on:click="toggleSection('@message.Section')" } v-show="filtersAllow('@Model.GetSlug(message.Mod)', '@levelStr') @sectionFilter"> @message.Time + @if (screenIds.Count > 1) + { + screen_@message.ScreenId + } @message.Level.ToString().ToUpper() @message.Mod @@ -325,7 +332,7 @@ else if (Model.ParsedLog?.IsValid == true) if (message.Repeated > 0) { - + repeats [@message.Repeated] times. } -- cgit