1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 15:27:24 +08:00

Apply suggested changes to fix implementation + tests

This commit is contained in:
Dan Balasescu 2024-08-30 18:28:19 +09:00
parent 464378f31b
commit 81854e221a
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}