mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Make Beatmap ISerializable and add more JsonIgnores
This commit is contained in:
@ -15,6 +15,7 @@ namespace osu.Game.Beatmaps
|
||||
public class BeatmapInfo : IEquatable<BeatmapInfo>, IJsonSerializable, IHasPrimaryKey
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[JsonIgnore]
|
||||
public int ID { get; set; }
|
||||
|
||||
//TODO: should be in database
|
||||
@ -38,13 +39,16 @@ namespace osu.Game.Beatmaps
|
||||
set { onlineBeatmapSetID = value > 0 ? value : null; }
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public int BeatmapSetInfoID { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonIgnore]
|
||||
public BeatmapSetInfo BeatmapSet { get; set; }
|
||||
|
||||
public BeatmapMetadata Metadata { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public int BaseDifficultyID { get; set; }
|
||||
|
||||
public BeatmapDifficulty BaseDifficulty { get; set; }
|
||||
@ -60,6 +64,7 @@ namespace osu.Game.Beatmaps
|
||||
[JsonProperty("file_sha2")]
|
||||
public string Hash { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool Hidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -74,6 +79,7 @@ namespace osu.Game.Beatmaps
|
||||
public float StackLeniency { get; set; }
|
||||
public bool SpecialStyle { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public int RulesetID { get; set; }
|
||||
|
||||
public RulesetInfo Ruleset { get; set; }
|
||||
@ -116,6 +122,7 @@ namespace osu.Game.Beatmaps
|
||||
public string Version { get; set; }
|
||||
|
||||
public double StarDifficulty { get; set; }
|
||||
public bool ShouldSerializeStarDifficulty() => false;
|
||||
|
||||
public bool Equals(BeatmapInfo other)
|
||||
{
|
||||
|
Reference in New Issue
Block a user