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:
parent
f78239c7f2
commit
8c31e96cdf
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user