Simplify/improve beatmap conversion precheck

This commit is contained in:
smoogipoo
2019-12-23 17:44:18 +09:00
parent cc808a9eb1
commit 6e7426a098
9 changed files with 13 additions and 18 deletions

View File

@ -33,7 +33,7 @@ namespace osu.Game.Beatmaps
/// <summary>
/// Whether <see cref="Beatmap"/> can be converted by this <see cref="BeatmapConverter{T}"/>.
/// </summary>
public bool CanConvert => !Beatmap.HitObjects.Any() || ValidConversionTypes.All(t => Beatmap.HitObjects.Any(t.IsInstanceOfType));
public abstract bool CanConvert();
/// <summary>
/// Converts <see cref="Beatmap"/>.
@ -92,11 +92,6 @@ namespace osu.Game.Beatmaps
return result;
}
/// <summary>
/// The types of HitObjects that can be converted to be used for this Beatmap.
/// </summary>
protected abstract IEnumerable<Type> ValidConversionTypes { get; }
/// <summary>
/// Creates the <see cref="Beatmap{T}"/> that will be returned by this <see cref="BeatmapProcessor"/>.
/// </summary>