mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
merged latest ppy/master
This commit is contained in:
@ -91,7 +91,13 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
// This is required as SettingsItem relies heavily on this bindable for internal use.
|
||||
// The actual update flow is done via the bindable provided in the constructor.
|
||||
public Bindable<float?> Current { get; set; } = new Bindable<float?>();
|
||||
private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>();
|
||||
|
||||
public Bindable<float?> Current
|
||||
{
|
||||
get => current.Current;
|
||||
set => current.Current = value;
|
||||
}
|
||||
|
||||
public SliderControl(BindableNumber<float> currentNumber)
|
||||
{
|
||||
|
@ -2,6 +2,8 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
@ -11,9 +13,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModNoFail), typeof(ModRelax), typeof(ModAutoplay) };
|
||||
|
||||
[SettingSource("Restart on fail", "Automatically restarts when failed.")]
|
||||
public BindableBool Restart { get; } = new BindableBool();
|
||||
|
||||
public virtual bool PerformFail() => true;
|
||||
|
||||
public virtual bool RestartOnFail => true;
|
||||
public virtual bool RestartOnFail => Restart.Value;
|
||||
|
||||
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
|
||||
{
|
||||
|
@ -21,6 +21,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModSuddenDeath)).ToArray();
|
||||
|
||||
protected ModPerfect()
|
||||
{
|
||||
Restart.Value = Restart.Default = true;
|
||||
}
|
||||
|
||||
protected override bool FailCondition(HealthProcessor healthProcessor, JudgementResult result)
|
||||
=> result.Type.AffectsAccuracy()
|
||||
&& result.Type != result.Judgement.MaxResult;
|
||||
|
Reference in New Issue
Block a user