mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 05:23:05 +08:00
Wrap xmldoc less and make a few fixes
This commit is contained in:
parent
1c553b5d48
commit
136627b9ac
@ -11,15 +11,18 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
public abstract class BeatmapVerifier
|
public abstract class BeatmapVerifier
|
||||||
{
|
{
|
||||||
// These are all ruleset-invariant, hence here instead of in e.g. `OsuChecker`.
|
/// <summary>
|
||||||
private readonly IReadOnlyList<Check> checks = new List<Check>
|
/// Checks which are performed regardless of ruleset.
|
||||||
|
/// These handle things like beatmap metadata, timing, and other ruleset agnostic elements.
|
||||||
|
/// </summary>
|
||||||
|
private readonly IReadOnlyList<Check> generalChecks = new List<Check>
|
||||||
{
|
{
|
||||||
new CheckBackground()
|
new CheckBackground()
|
||||||
};
|
};
|
||||||
|
|
||||||
public virtual IEnumerable<Issue> Run(IBeatmap beatmap)
|
public virtual IEnumerable<Issue> Run(IBeatmap beatmap)
|
||||||
{
|
{
|
||||||
return checks.SelectMany(check => check.Run(beatmap));
|
return generalChecks.SelectMany(check => check.Run(beatmap));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,25 +9,19 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
public abstract class Check
|
public abstract class Check
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the <see cref="CheckMetadata"/> for this check.
|
/// The metadata for this check.
|
||||||
/// Basically, its information.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public abstract CheckMetadata Metadata();
|
public abstract CheckMetadata Metadata();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The templates for issues that this check may use.
|
/// All possible templates for issues that this check may return.
|
||||||
/// Basically, what issues this check can detect.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public abstract IEnumerable<IssueTemplate> Templates();
|
public abstract IEnumerable<IssueTemplate> Templates();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns zero, one, or several issues detected by this
|
/// Runs this check and returns any issues detected for the provided beatmap.
|
||||||
/// check on the given beatmap.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="beatmap">The beatmap to run the check on.</param>
|
/// <param name="beatmap">The beatmap to run the check on.</param>
|
||||||
/// <returns></returns>
|
|
||||||
public abstract IEnumerable<Issue> Run(IBeatmap beatmap);
|
public abstract IEnumerable<Issue> Run(IBeatmap beatmap);
|
||||||
|
|
||||||
protected Check()
|
protected Check()
|
||||||
|
@ -42,14 +42,12 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The category this check belongs to. E.g. <see cref="CheckCategory.Metadata"/>,
|
/// The category this check belongs to. E.g. <see cref="CheckCategory.Metadata"/>, <see cref="CheckCategory.Timing"/>, or <see cref="CheckCategory.Compose"/>.
|
||||||
/// <see cref="CheckCategory.Timing"/>, or <see cref="CheckCategory.Compose"/>.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly CheckCategory Category;
|
public readonly CheckCategory Category;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes the issue(s) that this check looks for. Keep this brief, such that
|
/// Describes the issue(s) that this check looks for. Keep this brief, such that it fits into "No {description}". E.g. "Offscreen objects" / "Too short sliders".
|
||||||
/// it fits into "No {description}". E.g. "Offscreen objects" / "Too short sliders".
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly string Description;
|
public readonly string Description;
|
||||||
|
|
||||||
|
@ -22,17 +22,13 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
public IReadOnlyList<HitObject> HitObjects;
|
public IReadOnlyList<HitObject> HitObjects;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The template which this issue is using. This provides properties
|
/// The template which this issue is using. This provides properties such as the <see cref="IssueTemplate.IssueType"/>, and the <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||||
/// such as the <see cref="IssueTemplate.IssueType"/>, and the
|
|
||||||
/// <see cref="IssueTemplate.UnformattedMessage"/>.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IssueTemplate Template;
|
public IssueTemplate Template;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The arguments that give this issue its context, based on the
|
/// The arguments that give this issue its context, based on the <see cref="IssueTemplate"/>. These are then substituted into the <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||||
/// <see cref="IssueTemplate"/>. These are then substituted into the
|
/// This could for instance include timestamps, which diff is being compared to, what some volume is, etc.
|
||||||
/// <see cref="IssueTemplate.UnformattedMessage"/>.
|
|
||||||
/// E.g. timestamps, which diff is being compared to, what some volume is, etc.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object[] Arguments;
|
public object[] Arguments;
|
||||||
|
|
||||||
|
@ -35,8 +35,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
public Check Origin;
|
public Check Origin;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The type of the issue. E.g. <see cref="IssueType.Problem"/>,
|
/// The type of the issue.
|
||||||
/// <see cref="IssueType.Warning"/>, or <see cref="IssueType.Negligible"/>.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly IssueType Type;
|
public readonly IssueType Type;
|
||||||
|
|
||||||
@ -57,7 +56,6 @@ 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>
|
||||||
/// <returns></returns>
|
|
||||||
public string Message(params object[] args) => UnformattedMessage.FormatWith(args);
|
public string Message(params object[] args) => UnformattedMessage.FormatWith(args);
|
||||||
|
|
||||||
public static readonly Color4 PROBLEM_RED = new Colour4(1.0f, 0.4f, 0.4f, 1.0f);
|
public static readonly Color4 PROBLEM_RED = new Colour4(1.0f, 0.4f, 0.4f, 1.0f);
|
||||||
@ -68,7 +66,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the colour corresponding to the type of this issue.
|
/// Returns the colour corresponding to the type of this issue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
|
||||||
public Colour4 TypeColour()
|
public Colour4 TypeColour()
|
||||||
{
|
{
|
||||||
return Type switch
|
return Type switch
|
||||||
|
Loading…
Reference in New Issue
Block a user