1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Fix issue type and display percentage left

This commit is contained in:
Arthur Araujo 2024-03-18 13:51:36 -03:00
parent a3f3dcf853
commit 915a9682b5

View File

@ -27,18 +27,19 @@ namespace osu.Game.Rulesets.Edit.Checks
if (mappedPercentage < 80)
{
yield return new IssueTemplateUnusedAudioAtEnd(this).Create();
double percentageLeft = Math.Abs(mappedPercentage - 100);
yield return new IssueTemplateUnusedAudioAtEnd(this).Create(percentageLeft);
}
}
public class IssueTemplateUnusedAudioAtEnd : IssueTemplate
{
public IssueTemplateUnusedAudioAtEnd(ICheck check)
: base(check, IssueType.Problem, "There is more than 20% unused audio at the end.")
: base(check, IssueType.Warning, "Currently there is {0}% unused audio at the end. Ensure the outro significantly contributes to the song, otherwise cut the outro.")
{
}
public Issue Create() => new Issue(this);
public Issue Create(double percentageLeft) => new Issue(this, percentageLeft);
}
}
}