mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 07:07:45 +08:00
Apply suggested changes to fix implementation + tests
This commit is contained in:
parent
464378f31b
commit
81854e221a
@ -26,14 +26,14 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
if (CheckDefaultFailCondition(result))
|
||||
{
|
||||
bool allowFail = false;
|
||||
bool allowFail = true;
|
||||
|
||||
for (int i = 0; i < Mods.Value.Count; i++)
|
||||
{
|
||||
if (Mods.Value[i] is IBlockFail blockMod)
|
||||
{
|
||||
// Intentionally does not early return so that all mods have a chance to update internal states (e.g. ModEasyWithExtraLives).
|
||||
allowFail |= blockMod.AllowFail();
|
||||
allowFail &= blockMod.AllowFail();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
protected override bool CheckModsAllowFailure() => true;
|
||||
|
||||
public bool CheckFailed(bool failed)
|
||||
public bool CheckFailed(bool shouldHaveFailed)
|
||||
{
|
||||
if (!failed)
|
||||
if (!shouldHaveFailed)
|
||||
return ScoreProcessor.HasCompleted.Value && !HealthProcessor.HasFailed;
|
||||
|
||||
return HealthProcessor.HasFailed;
|
||||
return HealthProcessor.HasFailed || ScoreProcessor.HasFailed;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user