1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-12 18:47:19 +08:00

Rename hasHitsounds -> mapHasHitsounds

This commit is contained in:
Naxess 2021-06-26 23:49:25 +02:00
parent d29e6f4695
commit 5bc08ebadb

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Edit.Checks
new IssueTemplateNoHitsounds(this) new IssueTemplateNoHitsounds(this)
}; };
private bool hasHitsounds; private bool mapHasHitsounds;
private int objectsWithoutHitsounds; private int objectsWithoutHitsounds;
private double lastHitsoundTime; private double lastHitsoundTime;
@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Edit.Checks
if (!context.Beatmap.HitObjects.Any()) if (!context.Beatmap.HitObjects.Any())
yield break; yield break;
hasHitsounds = false; mapHasHitsounds = false;
objectsWithoutHitsounds = 0; objectsWithoutHitsounds = 0;
lastHitsoundTime = context.Beatmap.HitObjects.First().StartTime; lastHitsoundTime = context.Beatmap.HitObjects.First().StartTime;
@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Edit.Checks
yield return issue; yield return issue;
} }
if (!hasHitsounds) if (!mapHasHitsounds)
yield return new IssueTemplateNoHitsounds(this).Create(); yield return new IssueTemplateNoHitsounds(this).Create();
} }
@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Edit.Checks
// Only generating issues on hitsounded or last objects ensures we get one issue per long period. // Only generating issues on hitsounded or last objects ensures we get one issue per long period.
// If there are no hitsounds we let the "No hitsounds" template take precedence. // If there are no hitsounds we let the "No hitsounds" template take precedence.
if (hasHitsound(hitObject) || (isLastObject && hasHitsounds)) if (hasHitsound(hitObject) || (isLastObject && mapHasHitsounds))
{ {
var timeWithoutHitsounds = time - lastHitsoundTime; var timeWithoutHitsounds = time - lastHitsoundTime;
@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Edit.Checks
if (hasHitsound(hitObject)) if (hasHitsound(hitObject))
{ {
hasHitsounds = true; mapHasHitsounds = true;
objectsWithoutHitsounds = 0; objectsWithoutHitsounds = 0;
lastHitsoundTime = time; lastHitsoundTime = time;
} }