Skip to content

Commit

Permalink
CI fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
Givikap120 committed Aug 13, 2024
1 parent 1c81765 commit ce15637
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions PerformanceCalculatorGUI/Screens/ProfileScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ private void calculateProfileFromLazer(string username)

foreach (var scoreList in realmScores)
{

string beatmapHash = scoreList[0].BeatmapHash;

Check failure on line 457 in PerformanceCalculatorGUI/Screens/ProfileScreen.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Incorrect number of blank lines near braces, expected maximum 0 instead of 1 in PerformanceCalculatorGUI\Screens\ProfileScreen.cs on line 457
//get the .osu file from lazer file storage
var working = new FlatWorkingBeatmap(Path.Combine(lazerPath, "files", beatmapHash[..1], beatmapHash[..2], beatmapHash));
Expand All @@ -471,6 +472,9 @@ private void calculateProfileFromLazer(string username)

Schedule(() => loadingLayer.Text.Value = $"Calculating {player.Username}'s scores... {currentScoresCount} / {totalScoresCount}");

Check failure on line 473 in PerformanceCalculatorGUI/Screens/ProfileScreen.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Captured variable is modified in the outer scope in PerformanceCalculatorGUI\Screens\ProfileScreen.cs on line 473

if (score.BeatmapInfo == null)
continue;

int modsHash = RulesetHelper.GenerateModsHash(score.Mods, working.BeatmapInfo.Difficulty, ruleset.Value);

if (!attributesCache.TryGetValue(modsHash, out var difficultyAttributes))
Expand All @@ -485,8 +489,8 @@ private void calculateProfileFromLazer(string username)

currentScoresCount++;

// Sanity check for aspire maps till my slider fix won't get merged
if (difficultyAttributes.StarRating > 14 && score.BeatmapInfo.Status != BeatmapOnlineStatus.Ranked)
// Sanity check for aspire maps till slider fix won't get merged
if (difficultyAttributes.StarRating > 14 && !score.BeatmapInfo.Status.GrantsPerformancePoints())
continue;

tempScores.Add(new ProfileScore(score, perfAttributes));
Expand Down Expand Up @@ -555,10 +559,10 @@ private List<List<ScoreInfo>> getRealmScores(RealmAccess realm)
Schedule(() => loadingLayer.Text.Value = "Filtering scores...");

realmScores.RemoveAll(x => !currentUser.Contains(x.User.Username) // Wrong username
|| x.BeatmapInfo == null // No map for score
|| x.Passed == false || x.Rank == ScoreRank.F // Failed score
|| x.Ruleset.OnlineID != ruleset.Value.OnlineID // Incorrect ruleset
|| settingsMenu.ShouldBeFiltered(x)); // Customisable filters
|| x.BeatmapInfo == null // No map for score
|| x.Passed == false || x.Rank == ScoreRank.F // Failed score
|| x.Ruleset.OnlineID != ruleset.Value.OnlineID // Incorrect ruleset
|| settingsMenu.ShouldBeFiltered(x)); // Customisable filters

List<List<ScoreInfo>> groupedScores = realmScores.GroupBy(g => g.BeatmapHash).Select(s => s.ToList()).ToList();

Expand All @@ -571,9 +575,9 @@ private List<List<ScoreInfo>> getRealmScores(RealmAccess realm)

foreach (var mapScores in groupedScores)
{
List<ScoreInfo> filteredMapScores = mapScores.Where(s => s.IsLegacyScore)
List<ScoreInfo> filteredMapScores = mapScores.Where(x => x.IsLegacyScore)
.GroupBy(x => rulesetInstance.ConvertToLegacyMods(x.Mods))
.Select(g => g.MaxBy(g => g.LegacyTotalScore))
.Select(x => x.MaxBy(x => x.LegacyTotalScore))

Check failure on line 580 in PerformanceCalculatorGUI/Screens/ProfileScreen.cs

View workflow job for this annotation

GitHub Actions / Code Quality

Parameter 'x' hides outer parameter with the same name in PerformanceCalculatorGUI\Screens\ProfileScreen.cs on line 580
.ToList();

filteredMapScores.AddRange(mapScores.Where(s => !s.IsLegacyScore));
Expand Down

0 comments on commit ce15637

Please sign in to comment.