mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Add support for creating new blank difficulties
This commit is contained in:
@ -7,6 +7,7 @@ using Newtonsoft.Json;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Models;
|
||||
using osu.Game.Users;
|
||||
using osu.Game.Utils;
|
||||
using Realms;
|
||||
|
||||
#nullable enable
|
||||
@ -16,7 +17,7 @@ namespace osu.Game.Beatmaps
|
||||
[ExcludeFromDynamicCompile]
|
||||
[Serializable]
|
||||
[MapTo("BeatmapMetadata")]
|
||||
public class BeatmapMetadata : RealmObject, IBeatmapMetadataInfo
|
||||
public class BeatmapMetadata : RealmObject, IBeatmapMetadataInfo, IDeepCloneable<BeatmapMetadata>
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
@ -57,5 +58,18 @@ namespace osu.Game.Beatmaps
|
||||
IUser IBeatmapMetadataInfo.Author => Author;
|
||||
|
||||
public override string ToString() => this.GetDisplayTitle();
|
||||
|
||||
public BeatmapMetadata DeepClone() => new BeatmapMetadata(Author.DeepClone())
|
||||
{
|
||||
Title = Title,
|
||||
TitleUnicode = TitleUnicode,
|
||||
Artist = Artist,
|
||||
ArtistUnicode = ArtistUnicode,
|
||||
Source = Source,
|
||||
Tags = Tags,
|
||||
PreviewTime = PreviewTime,
|
||||
AudioFile = AudioFile,
|
||||
BackgroundFile = BackgroundFile
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user