From 1f4e0303f733265aa574d21d648d1ec1e3a5fa41 Mon Sep 17 00:00:00 2001 From: Dylan Nantz Date: Wed, 11 Jan 2023 14:13:29 -0500 Subject: [PATCH] add mania FadeIn mod configuration --- osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs | 10 +++++++--- osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs | 1 - osu.Game.Rulesets.Mania/Mods/ManiaModPlayfieldCover.cs | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs index 800973ede5..196514c7b1 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModFadeIn.cs @@ -20,8 +20,12 @@ namespace osu.Game.Rulesets.Mania.Mods protected override CoverExpandDirection ExpandDirection => CoverExpandDirection.AlongScroll; - // This could be customisable like ManiaModHidden in the future if there's any demand. - // At that point, the bindable could be moved to `ManiaModPlayfieldCover`. - public override BindableNumber Coverage { get; } = new BindableFloat(0.5f); + public override BindableNumber Coverage { get; } = new BindableFloat(0.5f) + { + Precision = 0.1f, + MinValue = 0.1f, + MaxValue = 0.7f, + Default = 0.5f, + }; } } diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs index 50d40249c1..8f0d5a770e 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs @@ -15,7 +15,6 @@ namespace osu.Game.Rulesets.Mania.Mods public override LocalisableString Description => @"Keys fade out before you hit them!"; public override double ScoreMultiplier => 1; - [SettingSource("Coverage", "The proportion of playfield height that notes will be hidden for.")] public override BindableNumber Coverage { get; } = new BindableFloat(0.5f) { Precision = 0.1f, diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModPlayfieldCover.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModPlayfieldCover.cs index 45d0184d1d..09abe8d7f4 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaModPlayfieldCover.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaModPlayfieldCover.cs @@ -6,6 +6,7 @@ using System.Linq; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Game.Configuration; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.UI; using osu.Game.Rulesets.Mods; @@ -23,6 +24,7 @@ namespace osu.Game.Rulesets.Mania.Mods /// protected abstract CoverExpandDirection ExpandDirection { get; } + [SettingSource("Coverage", "The proportion of playfield height that notes will be hidden for.")] public abstract BindableNumber Coverage { get; } public virtual void ApplyToDrawableRuleset(DrawableRuleset drawableRuleset)