Add a way to adjust the conversion process with mods

This commit is contained in:
smoogipoo
2018-01-03 18:58:43 +09:00
parent bd171926d6
commit 6d253fd33c
3 changed files with 27 additions and 0 deletions

View File

@ -176,6 +176,10 @@ namespace osu.Game.Rulesets.UI
if (!converter.CanConvert(workingBeatmap.Beatmap))
throw new BeatmapInvalidForRulesetException($"{nameof(Beatmap)} can not be converted for the current ruleset (converter: {converter}).");
// Apply conversion adjustments before converting
foreach (var mod in Mods.OfType<IApplicableToBeatmapConverter<TObject>>())
mod.ApplyToBeatmapConverter(converter);
// Convert the beatmap
Beatmap = converter.Convert(workingBeatmap.Beatmap);