diff --git a/Checks/Design/BgOffsetConsistencyCheck.cs b/Checks/Design/BgOffsetConsistencyCheck.cs index 7642cd3..1c45524 100644 --- a/Checks/Design/BgOffsetConsistencyCheck.cs +++ b/Checks/Design/BgOffsetConsistencyCheck.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Numerics; -using System.Text; using MapsetParser.objects; @@ -22,7 +21,7 @@ public override CheckMetadata GetMetadata() => { Author = "Nostril", Category = "Design", - Message = "Background offset inconsistency", + Message = "Background offset inconsistencies", Documentation = new Dictionary() { { @@ -43,10 +42,10 @@ Background offset should generally be consistent across difficulties." { _MINOR, new IssueTemplate(LEVEL_MINOR, - "\"{0}\" has {1} unique offsets: {2}", - "filename", - "# found", - "enumerated list") + "\"{0}\" {1}: ({2})", + "Filename", + "Offset Coordinates", + "List of Difficulties") .WithCause("Background offset is inconsistent across difficulties. Make sure this is intentional.") } }; @@ -78,35 +77,19 @@ public override IEnumerable GetIssues(BeatmapSet beatmapSet) continue; } - var outputString = convertOffsetsToString(offsets); - - yield return new Issue( - GetTemplate(_MINOR), - null, - fileName, - offsets.Count, - outputString - ); - } - } - - private string convertOffsetsToString(Dictionary> offsets) - { - if (offsets == null) - { - return null; - } - - StringBuilder sb = new StringBuilder(); - foreach (var offset in offsets) { - sb.Append(offset.Key); - sb.Append(" ("); - sb.Append(string.Join(", ", offset.Value)); - sb.Append("), "); + foreach (var offset in offsets) + { + var offsetCoords = offset.Key; + var diffNames = string.Join(", ", offset.Value); + yield return new Issue( + GetTemplate(_MINOR), + null, + fileName, + offsetCoords, + diffNames + ); + } } - sb.Remove(sb.Length - 2, 2); // Remove last trailing comma + space - - return sb.ToString(); } } } diff --git a/Checks/Timing/KiaiConsistencyCheck.cs b/Checks/Timing/KiaiConsistencyCheck.cs index b5ec812..1d5d87f 100644 --- a/Checks/Timing/KiaiConsistencyCheck.cs +++ b/Checks/Timing/KiaiConsistencyCheck.cs @@ -47,8 +47,9 @@ Kiais should generally be consistent across difficulties (except in GDs)." { _MINOR, new IssueTemplate(LEVEL_MINOR, - "{0}", - "List of Difficulty Names") + "Group {0}: ({1})", + "Kiai Group #", + "List of Difficulties") .WithCause("Kiai start and end times are not aligned across difficulties.") } }; @@ -77,7 +78,8 @@ public override IEnumerable GetIssues(BeatmapSet beatmapSet) yield return new Issue( GetTemplate(_MINOR), null, - "Group " + (i + 1).ToString() + ": (" + string.Join(", ", diffNameStrings[i]) + ")" + (i + 1).ToString(), + string.Join(", ", diffNameStrings[i]) ); } }