mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
Check for blocking fail mods by default
This commit is contained in:
parent
3efcf0493c
commit
9de0bcae1e
@ -87,9 +87,11 @@ namespace osu.Game.Screens.Play
|
|||||||
protected new readonly Bindable<IReadOnlyList<Mod>> Mods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
protected new readonly Bindable<IReadOnlyList<Mod>> Mods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to block the player from failing.
|
/// Whether failing should be allowed.
|
||||||
|
///
|
||||||
|
/// By default, this checks whether any selected mod disallows failing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual bool BypassFail => false;
|
protected virtual bool AllowFail => !Mods.Value.OfType<IApplicableFailOverride>().Any(m => !m.AllowFail);
|
||||||
|
|
||||||
private readonly bool allowPause;
|
private readonly bool allowPause;
|
||||||
private readonly bool showResults;
|
private readonly bool showResults;
|
||||||
@ -365,7 +367,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private bool onFail()
|
private bool onFail()
|
||||||
{
|
{
|
||||||
if (Mods.Value.OfType<IApplicableFailOverride>().Any(m => !m.AllowFail) || BypassFail)
|
if (!AllowFail)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
HasFailed = true;
|
HasFailed = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user