Skip to content

Commit

Permalink
Change which beatmap timing point issues get assigned to
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Schürz committed Jan 6, 2025
1 parent 4857016 commit d5144d3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ export class CheckInconsistentTimingPoints extends GeneralCheck {
const other = beatmap.controlPoints.timingPoints.find(it => Math.round(it.time) === Math.round(timingPoint.time));

if (!other) {
yield this.createIssue(this.templates.Missing, beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates.Missing, beatmap, timingPoint.time, refBeatmap.metadata.difficultyName);

return;
}
else {
if (other.meter !== timingPoint.meter)
yield this.createIssue(this.templates['Inconsistent Meter'], beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates['Inconsistent Meter'], beatmap, timingPoint.time, refBeatmap.metadata.difficultyName);
if (other.beatLength !== timingPoint.beatLength)
yield this.createIssue(this.templates['Inconsistent BPM'], beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates['Inconsistent BPM'], beatmap, timingPoint.time, refBeatmap.metadata.difficultyName);

const respectiveLineExact = beatmap.controlPoints.timingPoints.find(other => almostEquals(other.time, timingPoint.time));

if (respectiveLineExact === null)
yield this.createIssue(this.templates['Missing Minor'], beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates['Missing Minor'], beatmap, timingPoint.time, refBeatmap.metadata.difficultyName);
}
}

Expand All @@ -62,15 +62,15 @@ export class CheckInconsistentTimingPoints extends GeneralCheck {
const other = refBeatmap.controlPoints.timingPoints.find(it => Math.round(it.time) === Math.round(timingPoint.time));

if (!other) {
yield this.createIssue(this.templates.Missing, beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates.Missing, refBeatmap, timingPoint.time, beatmap.metadata.difficultyName);

return;
}
else {
const respectiveLineExact = refBeatmap.controlPoints.timingPoints.find(other => almostEquals(other.time, timingPoint.time));

if (respectiveLineExact === null)
yield this.createIssue(this.templates['Missing Minor'], beatmap, timingPoint.time, refBeatmap);
yield this.createIssue(this.templates['Missing Minor'], refBeatmap, timingPoint.time, beatmap.metadata.difficultyName);
}
}
}
Expand Down

0 comments on commit d5144d3

Please sign in to comment.