1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

style: use HitSampleInfo.All properties

This commit is contained in:
tsrk 2023-08-29 19:42:37 +02:00
parent 29a46f5b36
commit a04333c17b
No known key found for this signature in database
GPG Key ID: EBD46BB3049B56D6

View File

@ -23,8 +23,6 @@ namespace osu.Game.Rulesets.Edit.Checks
private const int delay_threshold_negligible = 1; private const int delay_threshold_negligible = 1;
private readonly string[] audioExtensions = { "mp3", "ogg", "wav" }; private readonly string[] audioExtensions = { "mp3", "ogg", "wav" };
private readonly string[] bankNames = { HitSampleInfo.BANK_NORMAL, HitSampleInfo.BANK_SOFT, HitSampleInfo.BANK_DRUM };
private readonly string[] sampleSets = { HitSampleInfo.HIT_NORMAL, HitSampleInfo.HIT_WHISTLE, HitSampleInfo.HIT_FINISH, HitSampleInfo.HIT_CLAP };
public CheckMetadata Metadata => new CheckMetadata(CheckCategory.Audio, "Delayed hit sounds."); public CheckMetadata Metadata => new CheckMetadata(CheckCategory.Audio, "Delayed hit sounds.");
@ -125,7 +123,8 @@ namespace osu.Game.Rulesets.Edit.Checks
string bank = parts[0]; string bank = parts[0];
string sampleSet = parts[1]; string sampleSet = parts[1];
return bankNames.Contains(bank) && sampleSets.Any(sampleSet.StartsWith); return HitSampleInfo.AllBanks.Contains(bank)
&& HitSampleInfo.AllAdditions.Concat(new[] { HitSampleInfo.HIT_NORMAL, HitSampleInfo.HIT_FLOURISH }).Any(sampleSet.StartsWith);
} }
public class IssueTemplateConsequentDelay : IssueTemplate public class IssueTemplateConsequentDelay : IssueTemplate