mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +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."
|
description: "Offscreen hitobjects."
|
||||||
);
|
);
|
||||||
|
|
||||||
public override IEnumerable<IssueTemplate> Templates() => new[]
|
public override IEnumerable<IssueTemplate> PossibleTemplates => new[]
|
||||||
{
|
{
|
||||||
templateOffscreen,
|
templateOffscreen,
|
||||||
templateOffscreenSliderPath
|
templateOffscreenSliderPath
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
|||||||
description: "Missing background."
|
description: "Missing background."
|
||||||
);
|
);
|
||||||
|
|
||||||
public override IEnumerable<IssueTemplate> Templates() => new[]
|
public override IEnumerable<IssueTemplate> PossibleTemplates => new[]
|
||||||
{
|
{
|
||||||
templateNoneSet,
|
templateNoneSet,
|
||||||
templateDoesNotExist
|
templateDoesNotExist
|
||||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// All possible templates for issues that this check may return.
|
/// All possible templates for issues that this check may return.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract IEnumerable<IssueTemplate> Templates();
|
public abstract IEnumerable<IssueTemplate> PossibleTemplates { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs this check and returns any issues detected for the provided beatmap.
|
/// 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()
|
protected Check()
|
||||||
{
|
{
|
||||||
foreach (var template in Templates())
|
foreach (var template in PossibleTemplates)
|
||||||
template.Origin = this;
|
template.Origin = this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
HitObjects = hitObjectList;
|
HitObjects = hitObjectList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString() => Template.GetMessage(Arguments);
|
||||||
{
|
|
||||||
return Template.Message(Arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetEditorTimestamp()
|
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.
|
/// Returns the formatted message given the arguments used to format it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">The arguments used to format the message.</param>
|
/// <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>
|
/// <summary>
|
||||||
/// Returns the colour corresponding to the type of this issue.
|
/// Returns the colour corresponding to the type of this issue.
|
||||||
|
Loading…
Reference in New Issue
Block a user