mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Change IBeatmapMetadataInfo.Author
to be an IUser
This commit is contained in:
parent
b9983add15
commit
7547810979
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The author of this beatmap.
|
/// The author of this beatmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
string Author { get; } // eventually should be linked to a persisted User.
|
IUser Author { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The source of this beatmap.
|
/// The source of this beatmap.
|
||||||
|
@ -5,6 +5,7 @@ using System;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Users;
|
||||||
using Realms;
|
using Realms;
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
@ -26,7 +27,7 @@ namespace osu.Game.Models
|
|||||||
[JsonProperty("artist_unicode")]
|
[JsonProperty("artist_unicode")]
|
||||||
public string ArtistUnicode { get; set; } = string.Empty;
|
public string ArtistUnicode { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string Author { get; set; } = string.Empty; // eventually should be linked to a persisted User.
|
public RealmUser Author { get; set; } = new RealmUser();
|
||||||
|
|
||||||
public string Source { get; set; } = string.Empty;
|
public string Source { get; set; } = string.Empty;
|
||||||
|
|
||||||
@ -41,5 +42,7 @@ namespace osu.Game.Models
|
|||||||
|
|
||||||
public string AudioFile { get; set; } = string.Empty;
|
public string AudioFile { get; set; } = string.Empty;
|
||||||
public string BackgroundFile { get; set; } = string.Empty;
|
public string BackgroundFile { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
IUser IBeatmapMetadataInfo.Author => Author;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
15
osu.Game/Models/RealmUser.cs
Normal file
15
osu.Game/Models/RealmUser.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// 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.Users;
|
||||||
|
using Realms;
|
||||||
|
|
||||||
|
namespace osu.Game.Models
|
||||||
|
{
|
||||||
|
public class RealmUser : EmbeddedObject, IUser
|
||||||
|
{
|
||||||
|
public int OnlineID { get; set; } = 1;
|
||||||
|
|
||||||
|
public string Username { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user