mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 23:53:21 +08:00
Revert "Move beatmap skin info creation to static method at IBeatmapSkin
"
This reverts commit 9806d94b74
.
This commit is contained in:
parent
14a4095140
commit
0c2d3ae0e7
@ -1,16 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
{
|
||||
public static class BeatmapSkinExtensions
|
||||
{
|
||||
public static SkinInfo CreateSkinInfo(BeatmapInfo beatmap) => new SkinInfo
|
||||
{
|
||||
Name = beatmap.ToString(),
|
||||
Creator = beatmap.Metadata?.AuthorString,
|
||||
};
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ namespace osu.Game.Skinning
|
||||
protected override bool UseCustomSampleBanks => true;
|
||||
|
||||
public LegacyBeatmapSkin(BeatmapInfo beatmap, IResourceStore<byte[]> storage, IStorageResourceProvider resources)
|
||||
: base(BeatmapSkinExtensions.CreateSkinInfo(beatmap), new LegacySkinResourceStore<BeatmapSetFileInfo>(beatmap.BeatmapSet, storage), resources, beatmap.Path)
|
||||
: base(createSkinInfo(beatmap), new LegacySkinResourceStore<BeatmapSetFileInfo>(beatmap.BeatmapSet, storage), resources, beatmap.Path)
|
||||
{
|
||||
// Disallow default colours fallback on beatmap skins to allow using parent skin combo colours. (via SkinProvidingContainer)
|
||||
Configuration.AllowDefaultComboColoursFallback = false;
|
||||
@ -49,5 +49,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
return base.GetSample(sampleInfo);
|
||||
}
|
||||
|
||||
private static SkinInfo createSkinInfo(BeatmapInfo beatmap) =>
|
||||
new SkinInfo { Name = beatmap.ToString(), Creator = beatmap.Metadata.Author.ToString() };
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user