Change types back

This commit is contained in:
Craftplacer 2020-09-01 17:58:06 +02:00
parent 9835d98942
commit c2ade44656
4 changed files with 8 additions and 8 deletions

View File

@ -57,7 +57,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
return a.ComboColours.SequenceEqual(b.ComboColours); return a.ComboColours.SequenceEqual(b.ComboColours);
} }
private void sort((IBeatmap beatmap, IBeatmapSkin beatmapSkin) tuple) private void sort((IBeatmap beatmap, ISkin beatmapSkin) tuple)
{ {
// Sort control points to ensure a sane ordering, as they may be parsed in different orders. This works because each group contains only uniquely-typed control points. // Sort control points to ensure a sane ordering, as they may be parsed in different orders. This works because each group contains only uniquely-typed control points.
foreach (var g in tuple.beatmap.ControlPointInfo.Groups) foreach (var g in tuple.beatmap.ControlPointInfo.Groups)
@ -77,7 +77,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
} }
} }
private class TestLegacySkin : LegacySkin, IBeatmapSkin private class TestLegacySkin : LegacySkin, ISkin
{ {
public TestLegacySkin(IResourceStore<byte[]> storage, string fileName) public TestLegacySkin(IResourceStore<byte[]> storage, string fileName)
: base(new SkinInfo { Name = "Test Skin", Creator = "Craftplacer" }, storage, null, fileName) : base(new SkinInfo { Name = "Test Skin", Creator = "Craftplacer" }, storage, null, fileName)
@ -85,7 +85,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
} }
} }
private Stream encodeToLegacy((IBeatmap beatmap, IBeatmapSkin beatmapSkin) fullBeatmap) private Stream encodeToLegacy((IBeatmap beatmap, ISkin beatmapSkin) fullBeatmap)
{ {
var (beatmap, beatmapSkin) = fullBeatmap; var (beatmap, beatmapSkin) = fullBeatmap;
var stream = new MemoryStream(); var stream = new MemoryStream();

View File

@ -196,7 +196,7 @@ namespace osu.Game.Beatmaps
/// <param name="info">The <see cref="BeatmapInfo"/> to save the content against. The file referenced by <see cref="BeatmapInfo.Path"/> will be replaced.</param> /// <param name="info">The <see cref="BeatmapInfo"/> to save the content against. The file referenced by <see cref="BeatmapInfo.Path"/> will be replaced.</param>
/// <param name="beatmapContent">The <see cref="IBeatmap"/> content to write.</param> /// <param name="beatmapContent">The <see cref="IBeatmap"/> content to write.</param>
/// <param name="beatmapSkin">The beatmap <see cref="ISkin"/> content to write, null if to be omitted.</param> /// <param name="beatmapSkin">The beatmap <see cref="ISkin"/> content to write, null if to be omitted.</param>
public void Save(BeatmapInfo info, IBeatmap beatmapContent, IBeatmapSkin beatmapSkin = null) public void Save(BeatmapInfo info, IBeatmap beatmapContent, ISkin beatmapSkin = null)
{ {
var setInfo = QueryBeatmapSet(s => s.Beatmaps.Any(b => b.ID == info.ID)); var setInfo = QueryBeatmapSet(s => s.Beatmaps.Any(b => b.ID == info.ID));

View File

@ -27,14 +27,14 @@ namespace osu.Game.Beatmaps.Formats
private readonly IBeatmap beatmap; private readonly IBeatmap beatmap;
[CanBeNull] [CanBeNull]
private readonly IBeatmapSkin skin; private readonly ISkin skin;
/// <summary> /// <summary>
/// Creates a new <see cref="LegacyBeatmapEncoder"/>. /// Creates a new <see cref="LegacyBeatmapEncoder"/>.
/// </summary> /// </summary>
/// <param name="beatmap">The beatmap to encode.</param> /// <param name="beatmap">The beatmap to encode.</param>
/// <param name="skin">The beatmap's skin, used for encoding combo colours.</param> /// <param name="skin">The beatmap's skin, used for encoding combo colours.</param>
public LegacyBeatmapEncoder(IBeatmap beatmap, [CanBeNull] IBeatmapSkin skin) public LegacyBeatmapEncoder(IBeatmap beatmap, [CanBeNull] ISkin skin)
{ {
this.beatmap = beatmap; this.beatmap = beatmap;
this.skin = skin; this.skin = skin;

View File

@ -48,7 +48,7 @@ namespace osu.Game.Screens.Edit
public readonly IBeatmap PlayableBeatmap; public readonly IBeatmap PlayableBeatmap;
public readonly IBeatmapSkin BeatmapSkin; public readonly ISkin BeatmapSkin;
[Resolved] [Resolved]
private BindableBeatDivisor beatDivisor { get; set; } private BindableBeatDivisor beatDivisor { get; set; }
@ -57,7 +57,7 @@ namespace osu.Game.Screens.Edit
private readonly Dictionary<HitObject, Bindable<double>> startTimeBindables = new Dictionary<HitObject, Bindable<double>>(); private readonly Dictionary<HitObject, Bindable<double>> startTimeBindables = new Dictionary<HitObject, Bindable<double>>();
public EditorBeatmap(IBeatmap playableBeatmap, IBeatmapSkin beatmapSkin = null) public EditorBeatmap(IBeatmap playableBeatmap, ISkin beatmapSkin = null)
{ {
PlayableBeatmap = playableBeatmap; PlayableBeatmap = playableBeatmap;
BeatmapSkin = beatmapSkin; BeatmapSkin = beatmapSkin;