mirror of
https://github.com/ppy/osu.git
synced 2026-05-28 03:53:45 +08:00
Rename property to reduce confusion
Caused an actual bug in one of the replaced usages.
This commit is contained in:
@@ -125,7 +125,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
.Select(attr => new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.Style.Caption1,
|
||||
Text = $@"{attr.Acronym}: {attr.Value:0.##}"
|
||||
Text = $@"{attr.Acronym}: {attr.AdjustedValue:0.##}"
|
||||
});
|
||||
|
||||
difficultyFillFlowContainer.Clear();
|
||||
|
||||
@@ -86,8 +86,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
foreach (var attribute in data.Attributes)
|
||||
{
|
||||
if (!Precision.AlmostEquals(attribute.Value, attribute.AdjustedValue))
|
||||
attributesFillFlow.Add(new AttributeDisplay(attribute.Acronym, attribute.Value, attribute.AdjustedValue));
|
||||
if (!Precision.AlmostEquals(attribute.OriginalValue, attribute.AdjustedValue))
|
||||
attributesFillFlow.Add(new AttributeDisplay(attribute.Acronym, attribute.OriginalValue, attribute.AdjustedValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
display.Label = attribute.Acronym;
|
||||
display.Current.Value = attribute.AdjustedValue;
|
||||
display.AdjustType.Value = VerticalAttributeDisplay.CalculateEffect(attribute.Value, attribute.AdjustedValue);
|
||||
display.AdjustType.Value = VerticalAttributeDisplay.CalculateEffect(attribute.OriginalValue, attribute.AdjustedValue);
|
||||
display.Alpha = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@ namespace osu.Game.Rulesets.Difficulty
|
||||
/// </summary>
|
||||
/// <param name="Label">The long label for this beatmap attribute.</param>
|
||||
/// <param name="Acronym">A two-letter acronym for this beatmap attribute.</param>
|
||||
/// <param name="Value">The value of this attribute before application of mods.</param>
|
||||
/// <param name="OriginalValue">The value of this attribute before application of mods.</param>
|
||||
/// <param name="AdjustedValue">The "effective" value of this attribute after application of mods.</param>
|
||||
/// <param name="MinValue">The lowest allowable value of this attribute.</param>
|
||||
/// <param name="MaxValue">The highest allowable value of this attribute.</param>
|
||||
public record RulesetBeatmapAttribute(
|
||||
LocalisableString Label,
|
||||
string Acronym,
|
||||
float Value,
|
||||
float OriginalValue,
|
||||
float AdjustedValue,
|
||||
float MinValue,
|
||||
float MaxValue);
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace osu.Game.Screens.Select.Details
|
||||
|
||||
display.Title = attribute.Label;
|
||||
display.MaxValue = attribute.MaxValue;
|
||||
display.Value = (attribute.Value, attribute.AdjustedValue);
|
||||
display.Value = (attribute.OriginalValue, attribute.AdjustedValue);
|
||||
display.Alpha = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
public record Data(LocalisableString Label, float Value, float AdjustedValue, float Maximum, string? Content = null)
|
||||
{
|
||||
public Data(RulesetBeatmapAttribute attribute)
|
||||
: this(attribute.Label, attribute.Value, attribute.AdjustedValue, attribute.MaxValue)
|
||||
: this(attribute.Label, attribute.OriginalValue, attribute.AdjustedValue, attribute.MaxValue)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user