Skip to content

Commit

Permalink
Merge pull request #382 from Micdu70/patch-2
Browse files Browse the repository at this point in the history
Bug fix (for new LTM)
  • Loading branch information
qutrits authored Sep 25, 2024
2 parents 492f774 + fbfdbae commit 3f3de9f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Entities/LogFileWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ private void AddLineAfterClientShutdown() {
};

private bool IsShowIsCasualShow(string showId) {
return string.Equals(showId, "casual_show") || string.Equals(showId, "no_elimination_explore");
return string.Equals(showId, "casual_show")
|| string.Equals(showId, "no_elimination_explore")
|| string.Equals(showId, "xtreme_explore");
}

private bool IsRealFinalRound(string roundId, string showId) {
Expand Down Expand Up @@ -651,10 +653,8 @@ private void UpdateServerConnectionLog(string session, string show) {
private void UpdatePersonalBestLog(RoundInfo info) {
if (info.PrivateLobby || (!info.IsCasualShow && info.UseShareCode) || !info.Finish.HasValue) { return; }

if (info.IsCasualShow && !string.Equals(info.ShowNameId, "no_elimination_explore")) {
if (string.IsNullOrEmpty(info.Name) || !string.Equals(info.ShowNameId, "user_creative_race_round")) {
return;
}
if (info.IsCasualShow && string.Equals(info.ShowNameId, "user_creative_race_round")) {
if (string.IsNullOrEmpty(info.Name)) { return; }

if (!this.StatsForm.ExistsPersonalBestLog(info.Finish.Value)) {
string levelName = string.IsNullOrEmpty(info.CreativeTitle) ? this.StatsForm.GetUserCreativeLevelTitle(info.Name) : info.CreativeTitle;
Expand Down
6 changes: 6 additions & 0 deletions Entities/Multilingual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13542,6 +13542,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "Explore - Xtreme" },
{ "xtreme_party", "X-treme Party" },

{ "show_wle_s10_wk01_mrs", "Creator Round Playlist 1" },
Expand Down Expand Up @@ -14449,6 +14450,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "Exploration - Xtrême" },
{ "xtreme_party", "Fête Xtrême" },

{ "show_wle_s10_wk01_mrs", "Playlist de Manche de créateur 1" },
Expand Down Expand Up @@ -15356,6 +15358,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "탐험 - X-익스트림" },
{ "xtreme_party", "X-익스트림 파티" },

{ "show_wle_s10_wk01_mrs", "크리에이터 라운드 플레이리스트 1" },
Expand Down Expand Up @@ -16263,6 +16266,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "自由探索 - エクストリーム" },
{ "xtreme_party", "エクストリームパーティー" },

{ "show_wle_s10_wk01_mrs", "クリエイターラウンドのプレイリスト1" },
Expand Down Expand Up @@ -17170,6 +17174,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "探索 - 极限糖豆人" },
{ "xtreme_party", "极限糖豆人派对" },

{ "show_wle_s10_wk01_mrs", "创作者回合节目列表 1" },
Expand Down Expand Up @@ -18077,6 +18082,7 @@ public static class Multilingual {
{ "wle_srs_single_winner_template_filler", "placeholder" },
{ "wle_srs_single_winner_template_final", "placeholder" },
{ "wle_srs_single_winner_template_opener", "placeholder" },
{ "xtreme_explore", "探索 - 極限糖豆人" },
{ "xtreme_party", "極限糖豆人派對" },

{ "show_wle_s10_wk01_mrs", "創作者回合節目列表 1" },
Expand Down
25 changes: 25 additions & 0 deletions Views/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3319,6 +3319,29 @@ where string.Equals(ri.ShowNameId, "event_april_fools") && ri.IsFinal == false
this.CurrentSettings.Version = 103;
this.SaveUserSettings();
}

if (this.CurrentSettings.Version == 103) {
List<RoundInfo> roundInfoList = (from ri in this.RoundDetails.FindAll()
where !string.IsNullOrEmpty(ri.ShowNameId) && string.Equals(ri.ShowNameId, "xtreme_explore")
select ri).ToList();

Profiles profile = this.Profiles.FindOne(Query.EQ("LinkedShowId", "event_xtreme_fall_guys_template"));
int profileId = profile?.ProfileId ?? -1;
foreach (RoundInfo ri in roundInfoList) {
if (profileId != -1) ri.Profile = profileId;
ri.IsCasualShow = true;
ri.Round = 1;
ri.Qualified = ri.Finish.HasValue;
ri.IsFinal = false;
ri.Crown = false;
ri.IsAbandon = false;
}
this.StatsDB.BeginTrans();
this.RoundDetails.Update(roundInfoList);
this.StatsDB.Commit();
this.CurrentSettings.Version = 104;
this.SaveUserSettings();
}
}

private UserSettings GetDefaultSettings() {
Expand Down Expand Up @@ -4757,6 +4780,8 @@ public string GetAlternateShowId(string showId) {
case "invisibeans_pistachio_template":
case "invisibeans_template":
return "invisibeans_mode";
case "xtreme_explore":
return "event_xtreme_fall_guys_template";
default:
return showId;
}
Expand Down

0 comments on commit 3f3de9f

Please sign in to comment.