From 2004583d4ee3b0e3eb145edbd761e9da7327ba83 Mon Sep 17 00:00:00 2001 From: Micdu70 Date: Wed, 1 Apr 2026 12:51:01 +0200 Subject: [PATCH] Bug fix --- Entities/LogFileWatcher.cs | 9 ++++- Entities/Multilingual.cs | 6 +++ FallGuysStats.csproj | 12 +++--- Views/Stats.cs | 79 ++++++++++++++++++++++++-------------- 4 files changed, 69 insertions(+), 37 deletions(-) diff --git a/Entities/LogFileWatcher.cs b/Entities/LogFileWatcher.cs index 29ade26e..6b6fe475 100644 --- a/Entities/LogFileWatcher.cs +++ b/Entities/LogFileWatcher.cs @@ -503,10 +503,11 @@ private bool IsModeException(string roundId, string showId) { || string.Equals(showId, "event_blast_ball_banger_template") || string.Equals(showId, "event_only_finals_v3_ranked") // || showId.StartsWith("knockout_") + || string.Equals(showId, "reversed_knockout_show") // "Tuokconk" Show || showId.StartsWith("ranked_"); // "Ranked Knockout" Show } - private bool IsModeFinalException(string roundId) { + private bool IsModeFinalException(int roundNum, string roundId) { return ((roundId.IndexOf("round_1v1_button_basher_event_only", StringComparison.OrdinalIgnoreCase) != -1 || roundId.IndexOf("round_lava_event_only_slime_climb", StringComparison.OrdinalIgnoreCase) != -1 || roundId.IndexOf("round_slimeclimb_2_event_only", StringComparison.OrdinalIgnoreCase) != -1 @@ -555,6 +556,10 @@ private bool IsModeFinalException(string roundId) { * || roundId.IndexOf("_final", StringComparison.OrdinalIgnoreCase) != -1)) */ + // "Tuokconk" Show + || (roundId.StartsWith("reversed_knockout_", StringComparison.OrdinalIgnoreCase) + && (roundNum == 3 || string.Equals(roundId, "reversed_knockout_door_dash"))) + // "Ranked Knockout" Show || (roundId.StartsWith("ranked_", StringComparison.OrdinalIgnoreCase) && roundId.EndsWith("_final", StringComparison.OrdinalIgnoreCase)); @@ -1033,7 +1038,7 @@ private bool ParseLine(LogLine line, List round, LogRound logRound) { } else if (logRound.Info.UseShareCode || this.IsRealFinalRound(logRound.Info.Round, logRound.Info.Name, logRound.Info.ShowNameId)) { logRound.Info.IsFinal = true; } else if (this.IsModeException(logRound.Info.Name, logRound.Info.ShowNameId)) { - logRound.Info.IsFinal = this.IsModeFinalException(logRound.Info.Name); + logRound.Info.IsFinal = this.IsModeFinalException(logRound.Info.Round, logRound.Info.Name); } else if (logRound.Info.Name.StartsWith("wle_s10_") || logRound.Info.Name.StartsWith("wle_mrs_")) { logRound.Info.IsFinal = this.StatsForm.StatLookup.TryGetValue(logRound.Info.Name, out LevelStats levelStats) && levelStats.IsFinal; } else { diff --git a/Entities/Multilingual.cs b/Entities/Multilingual.cs index 5e0e1420..4ed1ac14 100644 --- a/Entities/Multilingual.cs +++ b/Entities/Multilingual.cs @@ -13631,6 +13631,7 @@ public static class Multilingual { { "ranked_solo_show", "Ranked Solos" }, { "ranked_squads_show", "Ranked Squads" }, { "ranked_trios_show", "Ranked Trios" }, + { "reversed_knockout_show", "Tuokconk" }, { "showcase_fp13", "Scrapyard Stumble" }, { "showcase_fp16", "Frosty Frolics" }, { "showcase_fp17", "Fallentines Festival" }, @@ -14580,6 +14581,7 @@ public static class Multilingual { { "ranked_solo_show", "Solo classé" }, { "ranked_squads_show", "Groupe classé" }, { "ranked_trios_show", "Trio classé" }, + { "reversed_knockout_show", "Sionruot" }, { "showcase_fp13", "Férus de ferraille" }, { "showcase_fp16", "Folie givrée" }, { "showcase_fp17", "Festival haricœur à prendre" }, @@ -15529,6 +15531,7 @@ public static class Multilingual { { "ranked_solo_show", "랭크 솔로" }, { "ranked_squads_show", "랭크 스쿼드" }, { "ranked_trios_show", "랭크 트리오" }, + { "reversed_knockout_show", "웃아넉" }, { "showcase_fp13", "고철 스텀블" }, { "showcase_fp16", "프로스티 뜀박질" }, { "showcase_fp17", "폴렌타인 페스티벌" }, @@ -16478,6 +16481,7 @@ public static class Multilingual { { "ranked_solo_show", "ランク戦ソロ" }, { "ranked_squads_show", "ランク戦スクワッド" }, { "ranked_trios_show", "ランク戦トリオ" }, + { "reversed_knockout_show", "トウアクッノ" }, { "showcase_fp13", "つまずきスクラップ置き場" }, { "showcase_fp16", "冬景色のお祭り騒ぎ" }, { "showcase_fp17", "フォールレンタインフェスティバル" }, @@ -17427,6 +17431,7 @@ public static class Multilingual { { "ranked_solo_show", "排位单人" }, { "ranked_squads_show", "排位小队" }, { "ranked_trios_show", "排位三人" }, + { "reversed_knockout_show", "反淘汰赛" }, { "showcase_fp13", "废料场翻腾" }, { "showcase_fp16", "冰雪欢闹" }, { "showcase_fp17", "糖豆情人节" }, @@ -18376,6 +18381,7 @@ public static class Multilingual { { "ranked_solo_show", "單人排名戰" }, { "ranked_squads_show", "小隊排名戰" }, { "ranked_trios_show", "三人排名戰" }, + { "reversed_knockout_show", "重拳手?" }, { "showcase_fp13", "跌絆回收場" }, { "showcase_fp16", "戲雪之樂" }, { "showcase_fp17", "跌撞情人節" }, diff --git a/FallGuysStats.csproj b/FallGuysStats.csproj index ea7d4e3f..ff52181f 100644 --- a/FallGuysStats.csproj +++ b/FallGuysStats.csproj @@ -1185,7 +1185,7 @@ - + @@ -1198,10 +1198,10 @@ - + - + @@ -1235,14 +1235,14 @@ - - + + - + diff --git a/Views/Stats.cs b/Views/Stats.cs index 0d5563da..4b8feb27 100644 --- a/Views/Stats.cs +++ b/Views/Stats.cs @@ -107,34 +107,37 @@ private static bool IsAlreadyRunning() { private static readonly string LOGFILENAME = "Player.log"; public static readonly (string Name, DateTime StartDate)[] Seasons = new (string Name, DateTime StartDate)[] { - ("S1", new DateTime(2020, 8, 4, 0, 0, 0, DateTimeKind.Utc)), // Season 1 (Ultimate Knockout) - ("S2", new DateTime(2020, 10, 8, 0, 0, 0, DateTimeKind.Utc)), // Season 2 (Medieval Knockout) - ("S3", new DateTime(2020, 12, 15, 0, 0, 0, DateTimeKind.Utc)), // Season 3 (Winter Knockout) - ("S4", new DateTime(2021, 3, 22, 0, 0, 0, DateTimeKind.Utc)), // Season 4 (Fall Guys 4041) - ("S5", new DateTime(2021, 7, 20, 0, 0, 0, DateTimeKind.Utc)), // Season 5 (Jungle Adventure) - ("S6", new DateTime(2021, 11, 30, 0, 0, 0, DateTimeKind.Utc)), // Season 6 (Party Spectacular) - ("SS1", new DateTime(2022, 6, 21, 0, 0, 0, DateTimeKind.Utc)), // Season 1 (Free For All) - ("SS2", new DateTime(2022, 9, 15, 0, 0, 0, DateTimeKind.Utc)), // Season 2 (Satellite Scramble) - ("SS3", new DateTime(2022, 11, 22, 0, 0, 0, DateTimeKind.Utc)), // Season 3 (Sunken Secrets) - ("SS4", new DateTime(2023, 5, 10, 0, 0, 0, DateTimeKind.Utc)), // Season 4 (Creative Construction) - ("10.3", new DateTime(2023, 8, 16, 0, 0, 0, DateTimeKind.Utc)), // Summer Breeze Update - ("10.4", new DateTime(2023, 9, 27, 0, 0, 0, DateTimeKind.Utc)), // Fall Force Update - ("10.5", new DateTime(2023, 11, 7, 0, 0, 0, DateTimeKind.Utc)), // Tool Up Update - ("10.6", new DateTime(2023, 12, 6, 0, 0, 0, DateTimeKind.Utc)), // Power Party Update - ("10.7", new DateTime(2024, 1, 23, 0, 0, 0, DateTimeKind.Utc)), // Shapes and Stickers Update - ("10.8", new DateTime(2024, 2, 28, 0, 0, 0, DateTimeKind.Utc)), // Survival Update - ("10.9", new DateTime(2024, 5, 4, 0, 0, 0, DateTimeKind.Utc)), // Fall Forever Update - ("11.0", new DateTime(2024, 6, 11, 0, 0, 0, DateTimeKind.Utc)), // June '24 Update - ("11.1", new DateTime(2024, 7, 23, 0, 0, 0, DateTimeKind.Utc)), // July '24 Update - ("11.2", new DateTime(2024, 9, 3, 0, 0, 0, DateTimeKind.Utc)), // Scrapyard Stumble Update - ("11.3", new DateTime(2024, 10, 8, 0, 0, 0, DateTimeKind.Utc)), // Falloween 2024 Update - ("11.4", new DateTime(2024, 11, 7, 0, 0, 0, DateTimeKind.Utc)), // November '24 Update - ("11.5", new DateTime(2024, 12, 10, 0, 0, 0, DateTimeKind.Utc)), // Winter Update - ("11.6", new DateTime(2025, 2, 4, 0, 0, 0, DateTimeKind.Utc)), // Fall and Fantasy Update - ("18.0", new DateTime(2025, 4, 1, 0, 0, 0, DateTimeKind.Utc)), // Ranked Knockout Update - ("19.0", new DateTime(2025, 5, 27, 0, 0, 0, DateTimeKind.Utc)), // Yeetropolis Update - ("20.0", new DateTime(2025, 7, 29, 0, 0, 0, DateTimeKind.Utc)), // Tropical Tides Update - ("21.0", new DateTime(2025, 9, 16, 0, 0, 0, DateTimeKind.Utc)), // Slime Factory Update + ("S1", new DateTime(2020, 8, 4, 0, 0, 0, DateTimeKind.Utc)), // Season 1 (Ultimate Knockout) + ("S2", new DateTime(2020, 10, 8, 0, 0, 0, DateTimeKind.Utc)), // Season 2 (Medieval Knockout) + ("S3", new DateTime(2020, 12, 15, 0, 0, 0, DateTimeKind.Utc)), // Season 3 (Winter Knockout) + ("S4", new DateTime(2021, 3, 22, 0, 0, 0, DateTimeKind.Utc)), // Season 4 (Fall Guys 4041) + ("S5", new DateTime(2021, 7, 20, 0, 0, 0, DateTimeKind.Utc)), // Season 5 (Jungle Adventure) + ("S6", new DateTime(2021, 11, 30, 0, 0, 0, DateTimeKind.Utc)), // Season 6 (Party Spectacular) + ("SS1", new DateTime(2022, 6, 21, 0, 0, 0, DateTimeKind.Utc)), // Season 1 (Free For All) + ("SS2", new DateTime(2022, 9, 15, 0, 0, 0, DateTimeKind.Utc)), // Season 2 (Satellite Scramble) + ("SS3", new DateTime(2022, 11, 22, 0, 0, 0, DateTimeKind.Utc)), // Season 3 (Sunken Secrets) + ("SS4", new DateTime(2023, 5, 10, 0, 0, 0, DateTimeKind.Utc)), // Season 4 (Creative Construction) + ("10.3", new DateTime(2023, 8, 16, 0, 0, 0, DateTimeKind.Utc)), // Summer Breeze Update + ("10.4", new DateTime(2023, 9, 27, 0, 0, 0, DateTimeKind.Utc)), // Fall Force Update + ("10.5", new DateTime(2023, 11, 7, 0, 0, 0, DateTimeKind.Utc)), // Tool Up Update + ("10.6", new DateTime(2023, 12, 6, 0, 0, 0, DateTimeKind.Utc)), // Power Party Update + ("10.7", new DateTime(2024, 1, 23, 0, 0, 0, DateTimeKind.Utc)), // Shapes and Stickers Update + ("10.8", new DateTime(2024, 2, 28, 0, 0, 0, DateTimeKind.Utc)), // Survival Update + ("10.9", new DateTime(2024, 5, 4, 0, 0, 0, DateTimeKind.Utc)), // Fall Forever Update + ("11.0", new DateTime(2024, 6, 11, 0, 0, 0, DateTimeKind.Utc)), // June '24 Update + ("11.1", new DateTime(2024, 7, 23, 0, 0, 0, DateTimeKind.Utc)), // July '24 Update + ("11.2", new DateTime(2024, 9, 3, 0, 0, 0, DateTimeKind.Utc)), // Scrapyard Stumble Update + ("11.3", new DateTime(2024, 10, 8, 0, 0, 0, DateTimeKind.Utc)), // Falloween 2024 Update + ("11.4", new DateTime(2024, 11, 7, 0, 0, 0, DateTimeKind.Utc)), // November '24 Update + ("11.5", new DateTime(2024, 12, 10, 0, 0, 0, DateTimeKind.Utc)), // Winter Update + ("11.6", new DateTime(2025, 2, 4, 0, 0, 0, DateTimeKind.Utc)), // Fall and Fantasy Update + ("18.0", new DateTime(2025, 4, 1, 0, 0, 0, DateTimeKind.Utc)), // Ranked Knockout Update + ("19.0", new DateTime(2025, 5, 27, 0, 0, 0, DateTimeKind.Utc)), // Yeetropolis Update + ("20.0", new DateTime(2025, 7, 29, 0, 0, 0, DateTimeKind.Utc)), // Tropical Tides Update + ("21.0", new DateTime(2025, 9, 16, 0, 0, 0, DateTimeKind.Utc)), // Slime Factory Update + ("21.0.1", new DateTime(2025, 11, 11, 0, 0, 0, DateTimeKind.Utc)), // Arctic Adventures Update + ("21.1", new DateTime(2026, 1, 1, 0, 0, 0, DateTimeKind.Utc)), // Myths and Legends Update + ("21.2", new DateTime(2026, 3, 1, 0, 0, 0, DateTimeKind.Utc)), // Fools Folly Update }; private static DateTime SeasonStart, WeekStart, DayStart; private static DateTime SessionStart = DateTime.UtcNow; @@ -301,7 +304,7 @@ private static bool IsAlreadyRunning() { private readonly object dbTaskLock = new object(); public List dbTasks = new List(); - private readonly int currentDbVersion = 134; + private readonly int currentDbVersion = 135; public readonly string[] PublicShowIdList = { "main_show", @@ -355,6 +358,7 @@ private static bool IsAlreadyRunning() { "knockout_mode", // "knockout_duos", // "knockout_squads", + "reversed_knockout_show", "no_elimination_explore", "event_only_races_any_final_template", "event_only_fall_ball_trios_ranked", @@ -2041,6 +2045,22 @@ private void UpdateDatabaseDateFormat() { private void UpdateDatabaseVersion() { for (int version = this.CurrentSettings.Version; version < currentDbVersion; version++) { switch (version) { + case 134: { + List roundInfoList = (from ri in this.RoundDetails.FindAll() + where string.Equals(ri.ShowNameId, "reversed_knockout_show") + select ri).ToList(); + + Profiles profile = this.Profiles.FindOne(Query.EQ("LinkedShowId", "main_show")); + int profileId = profile?.ProfileId ?? -1; + foreach (RoundInfo ri in roundInfoList) { + if (profileId != -1) ri.Profile = profileId; + ri.IsFinal = ri.Round == 3 || string.Equals(ri.Name, "round_door_dash"); + } + this.StatsDB.BeginTrans(); + this.RoundDetails.Update(roundInfoList); + this.StatsDB.Commit(); + break; + } case 133: { List roundInfoList = (from ri in this.RoundDetails.FindAll() where string.Equals(ri.ShowNameId, "event_only_finals_v3_ranked") @@ -6079,6 +6099,7 @@ public string GetMainGroupShowId(string showId) { case "classic_solo_main_show": case "ftue_uk_show": case "knockout_mode": + case "reversed_knockout_show": case "no_elimination_explore": case "event_only_races_any_final_template": case "turbo_2_show":