1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Don't prompt for a replay if no item requires hit events

This commit is contained in:
Henry Lin 2022-02-02 19:07:14 +08:00
parent 1e19c7046a
commit 3c2a6fe208

View File

@ -105,6 +105,7 @@ namespace osu.Game.Screens.Ranking.Statistics
}; };
bool panelIsEmpty = true; bool panelIsEmpty = true;
bool panelIsComplete = true;
bool hitEventsAvailable = newScore.HitEvents.Count != 0; bool hitEventsAvailable = newScore.HitEvents.Count != 0;
foreach (var row in newScore.Ruleset.CreateInstance().CreateStatisticsForScore(newScore, playableBeatmap)) foreach (var row in newScore.Ruleset.CreateInstance().CreateStatisticsForScore(newScore, playableBeatmap))
@ -113,6 +114,9 @@ namespace osu.Game.Screens.Ranking.Statistics
? row.Columns ? row.Columns
: row.Columns.Where(c => !c.RequiresHitEvents).ToArray(); : row.Columns.Where(c => !c.RequiresHitEvents).ToArray();
if (columnsToDisplay.Length < row.Columns.Length)
panelIsComplete = false;
if (columnsToDisplay.Any()) if (columnsToDisplay.Any())
panelIsEmpty = false; panelIsEmpty = false;
else else
@ -163,7 +167,7 @@ namespace osu.Game.Screens.Ranking.Statistics
} }
}; };
} }
else else if (!panelIsComplete)
{ {
rows.Add(new FillFlowContainer rows.Add(new FillFlowContainer
{ {