From 390c7a5196ce5d67d6b29a81c8478c1638564181 Mon Sep 17 00:00:00 2001 From: eunma Date: Wed, 28 Jun 2023 19:33:06 +0900 Subject: [PATCH] Updated new show and round names --- Entities/LevelStats.cs | 5 ++++ Entities/Multilingual.cs | 50 ++++++++++++++++++++++++++++++++++++++++ Views/Overlay.cs | 4 ++-- Views/Stats.cs | 23 +++++++++++++++++- 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/Entities/LevelStats.cs b/Entities/LevelStats.cs index 1b65e86f4..5f81dd2be 100644 --- a/Entities/LevelStats.cs +++ b/Entities/LevelStats.cs @@ -240,6 +240,11 @@ public class LevelStats { { "wle_s10_player_round_wk5_17", new LevelStats("Big Bookcase", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, { "wle_s10_player_round_wk5_18", new LevelStats("Digital Doom", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, + { "wle_s10_bt_round_001", new LevelStats("Push Ups", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, + { "wle_s10_bt_round_002", new LevelStats("Heave & Haul", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, + { "wle_s10_bt_round_003", new LevelStats("Stepping Stones", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, + { "wle_s10_bt_round_004", new LevelStats("Double Trouble", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, + { "wle_mrs_bagel_opener_1", new LevelStats("Tunnel of Love", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, { "wle_mrs_bagel_opener_2", new LevelStats("Pink Parade", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, { "wle_mrs_bagel_opener_3", new LevelStats("Prideful Path", LevelType.Race, true, false, 10, Properties.Resources.round_gauntlet_icon, Properties.Resources.round_gauntlet_big_icon) }, diff --git a/Entities/Multilingual.cs b/Entities/Multilingual.cs index 11e8307e7..bec52615f 100644 --- a/Entities/Multilingual.cs +++ b/Entities/Multilingual.cs @@ -2172,6 +2172,11 @@ public static class Multilingual { {"wle_s10_player_round_wk5_17", "Big Bookcase"}, {"wle_s10_player_round_wk5_18", "Digital Doom"}, + {"wle_s10_bt_round_001", "Push Ups"}, + {"wle_s10_bt_round_002", "Heave & Haul"}, + {"wle_s10_bt_round_003", "Stepping Stones"}, + {"wle_s10_bt_round_004", "Double Trouble"}, + {"wle_mrs_bagel_opener_1", "Tunnel of Love"}, {"wle_mrs_bagel_opener_2", "Pink Parade"}, {"wle_mrs_bagel_opener_3", "Prideful Path"}, @@ -2391,6 +2396,11 @@ public static class Multilingual { {"wle_s10_player_round_wk5_17", "Big Bookcase"}, {"wle_s10_player_round_wk5_18", "Digital Doom"}, + {"wle_s10_bt_round_001", "Push Ups"}, + {"wle_s10_bt_round_002", "Heave & Haul"}, + {"wle_s10_bt_round_003", "Stepping Stones"}, + {"wle_s10_bt_round_004", "Double Trouble"}, + {"wle_mrs_bagel_opener_1", "Tunnel of Love"}, {"wle_mrs_bagel_opener_2", "Pink Parade"}, {"wle_mrs_bagel_opener_3", "Prideful Path"}, @@ -2610,6 +2620,11 @@ public static class Multilingual { {"wle_s10_player_round_wk5_17", "Big Bookcase"}, {"wle_s10_player_round_wk5_18", "Digital Doom"}, + {"wle_s10_bt_round_001", "Push Ups"}, + {"wle_s10_bt_round_002", "Heave & Haul"}, + {"wle_s10_bt_round_003", "Stepping Stones"}, + {"wle_s10_bt_round_004", "Double Trouble"}, + {"wle_mrs_bagel_opener_1", "Tunnel of Love"}, {"wle_mrs_bagel_opener_2", "Pink Parade"}, {"wle_mrs_bagel_opener_3", "Prideful Path"}, @@ -2829,6 +2844,11 @@ public static class Multilingual { {"wle_s10_player_round_wk5_17", "Big Bookcase"}, {"wle_s10_player_round_wk5_18", "Digital Doom"}, + {"wle_s10_bt_round_001", "Push Ups"}, + {"wle_s10_bt_round_002", "Heave & Haul"}, + {"wle_s10_bt_round_003", "Stepping Stones"}, + {"wle_s10_bt_round_004", "Double Trouble"}, + {"wle_mrs_bagel_opener_1", "Tunnel of Love"}, {"wle_mrs_bagel_opener_2", "Pink Parade"}, {"wle_mrs_bagel_opener_3", "Prideful Path"}, @@ -3048,6 +3068,11 @@ public static class Multilingual { {"wle_s10_player_round_wk5_17", "Big Bookcase"}, {"wle_s10_player_round_wk5_18", "Digital Doom"}, + {"wle_s10_bt_round_001", "Push Ups"}, + {"wle_s10_bt_round_002", "Heave & Haul"}, + {"wle_s10_bt_round_003", "Stepping Stones"}, + {"wle_s10_bt_round_004", "Double Trouble"}, + {"wle_mrs_bagel_opener_1", "Tunnel of Love"}, {"wle_mrs_bagel_opener_2", "Pink Parade"}, {"wle_mrs_bagel_opener_3", "Prideful Path"}, @@ -3447,6 +3472,11 @@ public static class Multilingual { {"show_wle_s10_wk07_srs_05", "Sky High Run"}, {"show_wle_s10_wk07_srs_06", "Full Speed Sliding (FSS) - Jelly Road"}, + {"show_wle_s10_wk08_srs_01", "Push Ups"}, + {"show_wle_s10_wk08_srs_02", "Heave & Haul"}, + {"show_wle_s10_wk08_srs_03", "Stepping Stones"}, + {"show_wle_s10_wk08_srs_04", "Double Trouble"}, + {"wle_mrs_bagel", "Rainbow Rally"}, {"slime_survivors", "Slime Survivors"}, @@ -3878,6 +3908,11 @@ public static class Multilingual { {"show_wle_s10_wk07_srs_05", "Sky High Run"}, {"show_wle_s10_wk07_srs_06", "Full Speed Sliding (FSS) - Jelly Road"}, + {"show_wle_s10_wk08_srs_01", "Push Ups"}, + {"show_wle_s10_wk08_srs_02", "Heave & Haul"}, + {"show_wle_s10_wk08_srs_03", "Stepping Stones"}, + {"show_wle_s10_wk08_srs_04", "Double Trouble"}, + {"wle_mrs_bagel", "Festival Arc-en-ciel"}, {"slime_survivors", "Survivants de la gélatine"}, @@ -4309,6 +4344,11 @@ public static class Multilingual { {"show_wle_s10_wk07_srs_05", "Sky High Run"}, {"show_wle_s10_wk07_srs_06", "Full Speed Sliding (FSS) - Jelly Road"}, + {"show_wle_s10_wk08_srs_01", "Push Ups"}, + {"show_wle_s10_wk08_srs_02", "Heave & Haul"}, + {"show_wle_s10_wk08_srs_03", "Stepping Stones"}, + {"show_wle_s10_wk08_srs_04", "Double Trouble"}, + {"wle_mrs_bagel", "레인보우 랠리"}, {"slime_survivors", "슬라임 서바이벌"}, @@ -4740,6 +4780,11 @@ public static class Multilingual { {"show_wle_s10_wk07_srs_05", "Sky High Run"}, {"show_wle_s10_wk07_srs_06", "Full Speed Sliding (FSS) - Jelly Road"}, + {"show_wle_s10_wk08_srs_01", "Push Ups"}, + {"show_wle_s10_wk08_srs_02", "Heave & Haul"}, + {"show_wle_s10_wk08_srs_03", "Stepping Stones"}, + {"show_wle_s10_wk08_srs_04", "Double Trouble"}, + {"wle_mrs_bagel", "レインボーラリー"}, {"slime_survivors", "スライム・サバイバー"}, @@ -5171,6 +5216,11 @@ public static class Multilingual { {"show_wle_s10_wk07_srs_05", "Sky High Run"}, {"show_wle_s10_wk07_srs_06", "Full Speed Sliding (FSS) - Jelly Road"}, + {"show_wle_s10_wk08_srs_01", "Push Ups"}, + {"show_wle_s10_wk08_srs_02", "Heave & Haul"}, + {"show_wle_s10_wk08_srs_03", "Stepping Stones"}, + {"show_wle_s10_wk08_srs_04", "Double Trouble"}, + {"wle_mrs_bagel", "彩虹拉力赛"}, {"slime_survivors", "黏液求生"}, diff --git a/Views/Overlay.cs b/Views/Overlay.cs index de49e82ee..91628ba13 100644 --- a/Views/Overlay.cs +++ b/Views/Overlay.cs @@ -1647,7 +1647,7 @@ private Bitmap RecreateBackground() { background = Properties.Resources.background; } else { if (overlayCustomized) { - if (!this.BackgroundResourceName.Equals(this.backgroundResourceNameCache)) { + if (!this.BackgroundResourceName.Equals(this.backgroundResourceNameCache) && File.Exists($"Overlay/{this.BackgroundResourceName}.png")) { this.customizedBackground = new Bitmap($"Overlay/{this.BackgroundResourceName}.png"); this.backgroundResourceNameCache = this.BackgroundResourceName; } @@ -1664,7 +1664,7 @@ private Bitmap RecreateBackground() { tab = Properties.Resources.tab_unselected; } else { if (overlayCustomized) { - if (!this.TabResourceName.Equals(this.tabResourceNameCache)) { + if (!this.TabResourceName.Equals(this.tabResourceNameCache) && File.Exists($"Overlay/{this.TabResourceName}.png")) { this.customizedTab = new Bitmap($"Overlay/{this.TabResourceName}.png"); this.tabResourceNameCache = this.TabResourceName; } diff --git a/Views/Stats.cs b/Views/Stats.cs index b4a3a3c35..130c6013a 100644 --- a/Views/Stats.cs +++ b/Views/Stats.cs @@ -1729,6 +1729,27 @@ private void UpdateDatabaseVersion() { this.CurrentSettings.Version = 41; this.SaveUserSettings(); } + + if (this.CurrentSettings.Version == 41) { + this.AllStats.AddRange(this.RoundDetails.FindAll()); + this.StatsDB.BeginTrans(); + this.CurrentSettings.NotifyServerConnected = false; + for (int i = this.AllStats.Count - 1; i >= 0; i--) { + RoundInfo info = this.AllStats[i]; + if ("show_wle_s10_wk08_srs_01".Equals(info.ShowNameId, StringComparison.OrdinalIgnoreCase) || + "show_wle_s10_wk08_srs_02".Equals(info.ShowNameId, StringComparison.OrdinalIgnoreCase) || + "show_wle_s10_wk08_srs_03".Equals(info.ShowNameId, StringComparison.OrdinalIgnoreCase) || + "show_wle_s10_wk08_srs_04".Equals(info.ShowNameId, StringComparison.OrdinalIgnoreCase)) + { + info.IsFinal = true; + this.RoundDetails.Update(info); + } + } + this.StatsDB.Commit(); + this.AllStats.Clear(); + this.CurrentSettings.Version = 42; + this.SaveUserSettings(); + } } private UserSettings GetDefaultSettings() { return new UserSettings { @@ -1800,7 +1821,7 @@ private UserSettings GetDefaultSettings() { UpdatedDateFormat = true, WinPerDayGraphStyle = 0, Visible = true, - Version = 41 + Version = 42 }; } private void UpdateHoopsieLegends() {