Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HitResults with the same name show across two columns in beatmap rankings #29911

Open
peppy opened this issue Sep 18, 2024 Discussed in #29904 · 1 comment
Open

HitResults with the same name show across two columns in beatmap rankings #29911

peppy opened this issue Sep 18, 2024 Discussed in #29904 · 1 comment

Comments

@peppy
Copy link
Sponsor Member

peppy commented Sep 18, 2024

Discussed in #29904

Originally posted by 424ever September 18, 2024
When looking at the scores on this map in game, there are 2 columns labeled as "Slider End". I think these should be combined into a single column.
image
There is (currently) only one score which uses the left column, which was set on Lazer with the Classic mod.
image


This is awkward as hell to attempt to fix.

Relevant code:

case HitResult.SliderTailHit:
case HitResult.SmallTickHit:
return "slider end";

var allScoreStatistics = scores.SelectMany(s => s.GetStatisticsForDisplay().Select(stat => stat.Result)).ToHashSet();
var ruleset = scores.First().Ruleset.CreateInstance();
foreach (var result in EnumExtensions.GetValuesInOrder<HitResult>())
{
if (!allScoreStatistics.Contains(result))
continue;
// for the time being ignore bonus result types.
// this is not being sent from the API and will be empty in all cases.
if (result.IsBonus())
continue;
var displayName = ruleset.GetDisplayNameForHitResult(result);
columns.Add(new TableColumn(displayName, Anchor.CentreLeft, new Dimension(minSize: 35, maxSize: 60)));
statisticResultTypes.Add((result, displayName));
}
if (showPerformancePoints)
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeaderspp, Anchor.CentreLeft, new Dimension(GridSizeMode.Absolute, 30)));
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeadersTime, Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
columns.Add(new TableColumn(BeatmapsetsStrings.ShowScoreboardHeadersMods, Anchor.CentreLeft, new Dimension(GridSizeMode.AutoSize)));
return columns.ToArray();

Could group by localisable string base string, but it makes things very fiddly (currently it's pre-checking stats across all scores to be displayed, so it kinda has to happen before that). Would want a second opinion before attempting this.

@bdach
Copy link
Collaborator

bdach commented Sep 19, 2024

Not sure it helps, but for reference this is how judgement counter handles the exact same problem right now:

// Due to weirdness in judgements, some results have the same name and should be aggregated for display purposes.
// There's only one case of this right now ("slider end").
foreach (var group in ruleset.Value.CreateInstance().GetHitResults().GroupBy(r => r.displayName))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants