mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:02:54 +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
|
||||
{
|
||||
// These are all ruleset-invariant, hence here instead of in e.g. `OsuChecker`.
|
||||
private readonly IReadOnlyList<Check> checks = new List<Check>
|
||||
/// <summary>
|
||||
/// 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()
|
||||
};
|
||||
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the <see cref="CheckMetadata"/> for this check.
|
||||
/// Basically, its information.
|
||||
/// The metadata for this check.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract CheckMetadata Metadata();
|
||||
|
||||
/// <summary>
|
||||
/// The templates for issues that this check may use.
|
||||
/// Basically, what issues this check can detect.
|
||||
/// All possible templates for issues that this check may return.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public abstract IEnumerable<IssueTemplate> Templates();
|
||||
|
||||
/// <summary>
|
||||
/// Returns zero, one, or several issues detected by this
|
||||
/// check on the given beatmap.
|
||||
/// Runs this check and returns any issues detected for the provided beatmap.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to run the check on.</param>
|
||||
/// <returns></returns>
|
||||
public abstract IEnumerable<Issue> Run(IBeatmap beatmap);
|
||||
|
||||
protected Check()
|
||||
|
@ -42,14 +42,12 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The category this check belongs to. E.g. <see cref="CheckCategory.Metadata"/>,
|
||||
/// <see cref="CheckCategory.Timing"/>, or <see cref="CheckCategory.Compose"/>.
|
||||
/// The category this check belongs to. E.g. <see cref="CheckCategory.Metadata"/>, <see cref="CheckCategory.Timing"/>, or <see cref="CheckCategory.Compose"/>.
|
||||
/// </summary>
|
||||
public readonly CheckCategory Category;
|
||||
|
||||
/// <summary>
|
||||
/// 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".
|
||||
/// 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".
|
||||
/// </summary>
|
||||
public readonly string Description;
|
||||
|
||||
|
@ -22,17 +22,13 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
public IReadOnlyList<HitObject> HitObjects;
|
||||
|
||||
/// <summary>
|
||||
/// The template which this issue is using. This provides properties
|
||||
/// such as the <see cref="IssueTemplate.IssueType"/>, and the
|
||||
/// <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||
/// The template which this issue is using. This provides properties such as the <see cref="IssueTemplate.IssueType"/>, and the <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||
/// </summary>
|
||||
public IssueTemplate Template;
|
||||
|
||||
/// <summary>
|
||||
/// The arguments that give this issue its context, based on the
|
||||
/// <see cref="IssueTemplate"/>. These are then substituted into the
|
||||
/// <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||
/// E.g. timestamps, which diff is being compared to, what some volume is, etc.
|
||||
/// The arguments that give this issue its context, based on the <see cref="IssueTemplate"/>. These are then substituted into the <see cref="IssueTemplate.UnformattedMessage"/>.
|
||||
/// This could for instance include timestamps, which diff is being compared to, what some volume is, etc.
|
||||
/// </summary>
|
||||
public object[] Arguments;
|
||||
|
||||
|
@ -35,8 +35,7 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
public Check Origin;
|
||||
|
||||
/// <summary>
|
||||
/// The type of the issue. E.g. <see cref="IssueType.Problem"/>,
|
||||
/// <see cref="IssueType.Warning"/>, or <see cref="IssueType.Negligible"/>.
|
||||
/// The type of the issue.
|
||||
/// </summary>
|
||||
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.
|
||||
/// </summary>
|
||||
/// <param name="args">The arguments used to format the message.</param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
@ -68,7 +66,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
/// <summary>
|
||||
/// Returns the colour corresponding to the type of this issue.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Colour4 TypeColour()
|
||||
{
|
||||
return Type switch
|
||||
|
Loading…
Reference in New Issue
Block a user