1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Rename method and adjust xmldoc to be very explicit about how wrong this is

This commit is contained in:
Dean Herbert 2023-11-17 17:04:02 +09:00
parent d1cea10f21
commit 9172632b0b
No known key found for this signature in database
6 changed files with 18 additions and 17 deletions

View File

@ -234,9 +234,9 @@ namespace osu.Game.Rulesets.Catch
};
}
public override BeatmapDifficulty GetRateAdjustedDifficulty(IBeatmapDifficultyInfo baseDifficulty, double rate)
public override BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDifficultyInfo difficulty, double rate)
{
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(baseDifficulty);
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
double preempt = adjustedDifficulty.ApproachRate < 6 ? (1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5) : (1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5);

View File

@ -330,9 +330,9 @@ namespace osu.Game.Rulesets.Osu
public override RulesetSetupSection CreateEditorSetupSection() => new OsuSetupSection();
public override BeatmapDifficulty GetRateAdjustedDifficulty(IBeatmapDifficultyInfo baseDifficulty, double rate)
public override BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDifficultyInfo difficulty, double rate)
{
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(baseDifficulty);
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
double preempt = adjustedDifficulty.ApproachRate < 5 ? (1200.0 + 600.0 * (5 - adjustedDifficulty.ApproachRate) / 5) : (1200.0 - 750.0 * (adjustedDifficulty.ApproachRate - 5) / 5);
preempt /= rate;

View File

@ -265,9 +265,9 @@ namespace osu.Game.Rulesets.Taiko
};
}
public override BeatmapDifficulty GetRateAdjustedDifficulty(IBeatmapDifficultyInfo baseDifficulty, double rate)
public override BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDifficultyInfo difficulty, double rate)
{
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(baseDifficulty);
BeatmapDifficulty adjustedDifficulty = new BeatmapDifficulty(difficulty);
double hitwindow = 35.0 - 15.0 * (adjustedDifficulty.OverallDifficulty - 5) / 5;
hitwindow /= rate;

View File

@ -179,7 +179,7 @@ namespace osu.Game.Overlays.Mods
mod.ApplyToDifficulty(originalDifficulty);
Ruleset ruleset = gameRuleset.Value.CreateInstance();
adjustedDifficulty = ruleset.GetRateAdjustedDifficulty(originalDifficulty, rate);
adjustedDifficulty = ruleset.GetRateAdjustedDisplayDifficulty(originalDifficulty, rate);
haveRateChangedValues = hasRateAdjustedProperties(originalDifficulty, adjustedDifficulty);

View File

@ -377,6 +377,16 @@ namespace osu.Game.Rulesets
/// <returns>The display name.</returns>
public virtual LocalisableString GetDisplayNameForHitResult(HitResult result) => result.GetLocalisableDescription();
/// <summary>
/// Applies changes to difficulty attributes for presenting to a user a rough estimate of how rate adjust mods affect difficulty.
/// Importantly, this should NOT BE USED FOR ANY CALCULATIONS.
/// It is also not always correct, and arguably is never correct depending on your frame of mind.
/// </summary>
/// <param name="difficulty">>The <see cref="IBeatmapDifficultyInfo"/> that will be adjusted.</param>
/// <param name="rate">The rate adjustment multiplier from mods. For example 1.5 for DT.</param>
/// <returns>The adjusted difficulty attributes.</returns>
public virtual BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDifficultyInfo difficulty, double rate) => new BeatmapDifficulty(difficulty);
/// <summary>
/// Creates ruleset-specific beatmap filter criteria to be used on the song select screen.
/// </summary>
@ -391,14 +401,5 @@ namespace osu.Game.Rulesets
/// Can be overridden to alter the difficulty section to the editor beatmap setup screen.
/// </summary>
public virtual DifficultySection? CreateEditorDifficultySection() => null;
/// <summary>
/// Changes <see cref="BeatmapDifficulty"/> after they're adjusted according to rate.
/// Doesn't change any attributes by default.
/// </summary>
/// <param name="baseDifficulty">>The <see cref="IBeatmapDifficultyInfo"/> that will be adjusted.</param>
/// <param name="rate">Rate of the gameplay. For example 1.5 for DT.</param>
/// <returns>Copy of difficulty info with values changed according to rate and ruleset-specific behaviour.</returns>
public virtual BeatmapDifficulty GetRateAdjustedDifficulty(IBeatmapDifficultyInfo baseDifficulty, double rate) => new BeatmapDifficulty(baseDifficulty);
}
}

View File

@ -137,7 +137,7 @@ namespace osu.Game.Screens.Select.Details
foreach (var mod in mods.Value.OfType<IApplicableToRate>())
rate = mod.ApplyToRate(0, rate);
adjustedDifficulty = ruleset.GetRateAdjustedDifficulty(originalDifficulty, rate);
adjustedDifficulty = ruleset.GetRateAdjustedDisplayDifficulty(originalDifficulty, rate);
haveRateChangedValues = hasRateAdjustedProperties(originalDifficulty, adjustedDifficulty);
}
}