1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Change some methods to get properties

This commit is contained in:
Dean Herbert 2021-04-12 15:37:41 +09:00
parent f78239c7f2
commit 8c31e96cdf
5 changed files with 6 additions and 9 deletions

View File

@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Checks
description: "Offscreen hitobjects."
);
public override IEnumerable<IssueTemplate> Templates() => new[]
public override IEnumerable<IssueTemplate> PossibleTemplates => new[]
{
templateOffscreen,
templateOffscreenSliderPath

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Edit.Checks
description: "Missing background."
);
public override IEnumerable<IssueTemplate> Templates() => new[]
public override IEnumerable<IssueTemplate> PossibleTemplates => new[]
{
templateNoneSet,
templateDoesNotExist

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
/// <summary>
/// All possible templates for issues that this check may return.
/// </summary>
public abstract IEnumerable<IssueTemplate> Templates();
public abstract IEnumerable<IssueTemplate> PossibleTemplates { get; }
/// <summary>
/// Runs this check and returns any issues detected for the provided beatmap.
@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
protected Check()
{
foreach (var template in Templates())
foreach (var template in PossibleTemplates)
template.Origin = this;
}
}

View File

@ -69,10 +69,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
HitObjects = hitObjectList;
}
public override string ToString()
{
return Template.Message(Arguments);
}
public override string ToString() => Template.GetMessage(Arguments);
public string GetEditorTimestamp()
{

View File

@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
/// Returns the formatted message given the arguments used to format it.
/// </summary>
/// <param name="args">The arguments used to format the message.</param>
public string Message(params object[] args) => UnformattedMessage.FormatWith(args);
public string GetMessage(params object[] args) => UnformattedMessage.FormatWith(args);
/// <summary>
/// Returns the colour corresponding to the type of this issue.