mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Move check origin from IssueTemplate
to Issue
As a result we can also make check an interface, and need to provide the check itself when constructing an issue.
This commit is contained in:
@ -6,28 +6,22 @@ using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public abstract class Check
|
||||
public interface ICheck
|
||||
{
|
||||
/// <summary>
|
||||
/// The metadata for this check.
|
||||
/// </summary>
|
||||
public abstract CheckMetadata Metadata { get; }
|
||||
public CheckMetadata Metadata { get; }
|
||||
|
||||
/// <summary>
|
||||
/// All possible templates for issues that this check may return.
|
||||
/// </summary>
|
||||
public abstract IEnumerable<IssueTemplate> PossibleTemplates { get; }
|
||||
public IEnumerable<IssueTemplate> PossibleTemplates { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs this check and returns any issues detected for the provided beatmap.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to run the check on.</param>
|
||||
public abstract IEnumerable<Issue> Run(IBeatmap beatmap);
|
||||
|
||||
protected Check()
|
||||
{
|
||||
foreach (var template in PossibleTemplates)
|
||||
template.Origin = this;
|
||||
}
|
||||
public IEnumerable<Issue> Run(IBeatmap beatmap);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user