1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 23:33:23 +08:00

Revert oversight.

This reverts commit 79e0377638.

The intention of these was to match the Precision values without much code repetition but this seems out of scope + the precision on `StartingFlaghlightSize` isn't really necessary since user changed values precision is capped at a min of 0.1
This commit is contained in:
o-dasher 2022-10-13 14:59:45 -04:00
parent f3435f9abc
commit bf7b3ee30e
5 changed files with 31 additions and 16 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.UI;
@ -14,10 +15,12 @@ namespace osu.Game.Rulesets.Catch.Mods
{
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
public CatchModFlashlight()
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
{
StartingFlashlightSize.MaxValue = 1.5f;
}
MinValue = 0.5f,
MaxValue = 1.5f,
Precision = 0.1f
};
public override float DefaultFlashlightSize => 325;

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Layout;
using osu.Game.Rulesets.Mania.Objects;
@ -18,9 +19,15 @@ namespace osu.Game.Rulesets.Mania.Mods
public ManiaModFlashlight()
{
FinalFlashlightSize.Default = 1;
StartingFlashlightSize.MaxValue = 3;
}
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
{
MinValue = 0.5f,
MaxValue = 3f,
Precision = 0.1f
};
public override float DefaultFlashlightSize => 50;
protected override Flashlight CreateFlashlight() => new ManiaFlashlight(this);

View File

@ -32,6 +32,13 @@ namespace osu.Game.Rulesets.Osu.Mods
Precision = default_follow_delay,
};
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
{
MinValue = 0.5f,
MaxValue = 2f,
Precision = 0.1f
};
public override float DefaultFlashlightSize => 200;
private OsuFlashlight flashlight = null!;

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Layout;
using osu.Game.Rulesets.Mods;
@ -15,6 +16,13 @@ namespace osu.Game.Rulesets.Taiko.Mods
{
public override double ScoreMultiplier => UsesDefaultConfiguration ? 1.12 : 1;
public override BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
{
MinValue = 0.5f,
MaxValue = 1.5f,
Precision = 0.1f
};
public override float DefaultFlashlightSize => 200;
protected override Flashlight CreateFlashlight() => new TaikoFlashlight(this, playfield);
@ -24,9 +32,6 @@ namespace osu.Game.Rulesets.Taiko.Mods
public override void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{
playfield = (TaikoPlayfield)drawableRuleset.Playfield;
StartingFlashlightSize.MaxValue = 1.5f;
base.ApplyToDrawableRuleset(drawableRuleset);
}

View File

@ -32,8 +32,6 @@ namespace osu.Game.Rulesets.Mods
public override ModType Type => ModType.DifficultyIncrease;
public override LocalisableString Description => "Restricted view area.";
private const float size_customization_precision = 0.05f;
private float findClosestMultipleFrom(int value, float multiple) => MathF.Round(value / multiple) * multiple;
protected ModFlashlight()
@ -51,19 +49,14 @@ namespace osu.Game.Rulesets.Mods
}
[SettingSource("Starting flashlight size", "Multiplier applied to the default flashlight size.")]
public BindableFloat StartingFlashlightSize { get; } = new BindableFloat(1)
{
MinValue = 0.5f,
MaxValue = 2,
Precision = size_customization_precision
};
public abstract BindableFloat StartingFlashlightSize { get; }
[SettingSource("Final flashlight size", "Multiplier applied to the starting flashlight size after the max flashlight combo is reached.")]
public BindableFloat FinalFlashlightSize { get; } = new BindableFloat(0.625f)
{
MinValue = 0.5f,
MaxValue = 1,
Precision = size_customization_precision
Precision = 0.05f
};
[SettingSource("Change size combo divisor", "Changes the combo divisor where the flashlight size is changed.")]