Make `BeatmapAttributeText` to have mod-relevant info
- Fixes https://github.com/ppy/osu/issues/21946
As you can see, current BeatmapAttributeText takes the data directly from the beatmap class. For something like beatmap name it's fine, but for example Star Rating will quickly become irrelevant if you will switch Ruleset or enable some Mods.
This PR fixes this by changing the update logic of such attributes as:
- BPM
- Length
- Circle Size
- HP Drain
- Approach Rate
- Overall Difficulty They will be updated on: Beatmap change, Ruleset change, Mod change, Mod Setting change.
In the separate branch of logic (only on Beatmap change) will be updated such attributes as:
- Star Rating
- (new) Max Performance, aka pp for SS. This attribute was requested by many players.
Those attributes are updated via
BindableDifficulty.
For Max Performance attribute to work, code for simulating SS play was moved from PerformanceBreakdownCalculator to the corresponding util function in the newly created ScoreUtils class.
As bdach requested, attributes text data will be updated according to the category of current attribute (for performance reasons).
So this is just adding a bunch of new components that respect mods? And BeatmapAttributeText continues to not do so?
I cannot accept that premise. To me this PR is not valid because it does not do the right thing.
BeatmapAttributeText exists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.
So this is just adding a bunch of new components that respect mods? And
BeatmapAttributeTextcontinues to not do so?I cannot accept that premise. To me this PR is not valid because it does not do the right thing.
BeatmapAttributeTextexists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.
So you propose changing BeatmapAttributeText to respect mods?
If yes - the only question is what to do with toggle AccountForRate that makes AR and OD rate-adjusted?
Are there a way to hide a toggle if selected something other than AR/OD?
Or just remove it in general
the only question is what to do with toggle
AccountForRatethat makes AR and OD rate-adjusted? Are there a way to hide a toggle if selected something other than AR/OD? Or just remove it in general
Either use a different placeholder for not rate-adjusted AR/OD or just use rate-adjusted always. It's not like the mod select display has a toggle for accounting for rate or not is it?
So this is just adding a bunch of new components that respect mods? And
BeatmapAttributeTextcontinues to not do so?I cannot accept that premise. To me this PR is not valid because it does not do the right thing.
BeatmapAttributeTextexists now and users are using it. So it must be made to work correctly. Or something has to be done silently for users to keep their skins working.
Change PR according to this. Now new tests are required?
Changed the logic to make it update only necessary info instead of all Still some room for optimization, but the effect is not worth it for extra complexity
Please update the PR description to explain in detail what this does. Users need documentation of this in changelogs and I'm not going to go through and do this myself from the code.
Please update the PR description to explain in detail what this does. Users need documentation of this in changelogs and I'm not going to go through and do this myself from the code.
made detailed description
How are you testing this btw? There doesn't look to be a test scene setup.