-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Make BeatmapAttributeText
to have mod-relevant info
#29151
Conversation
So this is just adding a bunch of new components that respect mods? And I cannot accept that premise. To me this PR is not valid because it does not do the right thing.
|
So you propose changing |
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? |
BeatmapAttributeText
to have mod-relevant info
Change PR according to this. Now new tests are required? |
Changed the logic to make it update only necessary info instead of all |
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 |
additional optimisation
How are you testing this btw? There doesn't look to be a test scene setup. |
osu.Game/Utils/ScoreUtils.cs
Outdated
/// <param name="beatmap">Beatmap, on which perfect play will be simulated</param> | ||
/// <param name="ruleset">Ruleset, for which perfect play will be simulated</param> | ||
/// <param name="mods">(Optional) set of mods that will be accounted for in simulation</param> | ||
/// <param name="baseScore">(Optional) score that will be used as a base</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this parameter.
[Resolved] | ||
private BeatmapDifficultyCache difficultyCache { get; set; } = null!; | ||
|
||
private Bindable<StarDifficulty?>? bindableDifficulty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null null? no thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bindable<StarDifficulty?>
is the return type of difficultyCache.GetBindableDifficulty
And this Bindable is not always set (it will be created only when Attribute is StarRating
or MaxPerformance
)
Because of this Bindable is nullable
How it can be made in a different way? I don't quite understand
|
||
private async Task<double> calculateMaxPerformance(DifficultyAttributes? difficultyAttributes) | ||
{ | ||
if (difficultyAttributes == null || cancellationTokenSource == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh? what's is this supposed to imply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sanity check so it will not try to calculate pp if something happened during difficultyAttributes
calculation (either cancelled or error)
BeatmapAttributeText
are not affected by mods #21946As 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:
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:
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 createdScoreUtils
class.As bdach requested, attributes text data will be updated according to the category of current attribute (for performance reasons).