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

Make ModMirror and rate adjusting mods ranked #29324

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion osu.Game/Rulesets/Mods/ModDoubleTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public abstract class ModDoubleTime : ModRateAdjust
public override IconUsage? Icon => OsuIcon.ModDoubleTime;
public override ModType Type => ModType.DifficultyIncrease;
public override LocalisableString Description => "Zoooooooooom...";
public override bool Ranked => SpeedChange.IsDefault;

[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Rulesets/Mods/ModHalfTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public abstract class ModHalfTime : ModRateAdjust
public override IconUsage? Icon => OsuIcon.ModHalftime;
public override ModType Type => ModType.DifficultyReduction;
public override LocalisableString Description => "Less zoom...";
public override bool Ranked => SpeedChange.IsDefault;

[SettingSource("Speed decrease", "The actual decrease to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(0.75)
Expand Down
1 change: 1 addition & 0 deletions osu.Game/Rulesets/Mods/ModMirror.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public abstract class ModMirror : Mod
public override string Acronym => "MR";
public override ModType Type => ModType.Conversion;
public override double ScoreMultiplier => 1;
public override bool Ranked => true;
}
}
1 change: 0 additions & 1 deletion osu.Game/Rulesets/Mods/ModNightcore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public abstract class ModNightcore : ModRateAdjust
public override IconUsage? Icon => OsuIcon.ModNightcore;
public override ModType Type => ModType.DifficultyIncrease;
public override LocalisableString Description => "Uguuuuuuuu...";
public override bool Ranked => UsesDefaultConfiguration;

[SettingSource("Speed increase", "The actual increase to apply", SettingControlType = typeof(MultiplierSettingsSlider))]
public override BindableNumber<double> SpeedChange { get; } = new BindableDouble(1.5)
Expand Down
5 changes: 5 additions & 0 deletions osu.Game/Rulesets/Mods/ModRateAdjust.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Linq;
using osu.Framework.Audio;
using osu.Framework.Bindables;

Expand All @@ -27,5 +28,9 @@ public virtual void ApplyToSample(IAdjustableAudioComponent sample)
public override string SettingDescription => SpeedChange.IsDefault ? string.Empty : $"{SpeedChange.Value:N2}x";

public override string ExtendedIconInformation => SettingDescription;

public override bool Ranked =>
// only allow speed change to be ranked to be sure that any mods that inherit this one don't accidentally make new settings ranked too
SettingsBindables.Where(s => s != SpeedChange).All(s => s.IsDefault);
stanriders marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading