mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Ensure BeatmapInfo
Difficulty
and Metadata
is non-null
This commit is contained in:
parent
a7958b1d31
commit
6033a825ed
@ -32,9 +32,21 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public RulesetInfo Ruleset { get; set; } = null!;
|
||||
|
||||
public BeatmapDifficulty Difficulty { get; set; } = null!;
|
||||
public BeatmapDifficulty Difficulty { get; set; } = new BeatmapDifficulty();
|
||||
|
||||
public BeatmapMetadata Metadata { get; set; } = null!;
|
||||
public BeatmapMetadata Metadata { get; set; } = new BeatmapMetadata();
|
||||
|
||||
public BeatmapInfo(RulesetInfo ruleset, BeatmapDifficulty difficulty, BeatmapMetadata metadata)
|
||||
{
|
||||
Ruleset = ruleset;
|
||||
Difficulty = difficulty;
|
||||
Metadata = metadata;
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public BeatmapInfo() // TODO: this bypasses null safeties. needs to be hidden from user api (only should be used by realm).
|
||||
{
|
||||
}
|
||||
|
||||
public BeatmapSetInfo? BeatmapSet { get; set; }
|
||||
|
||||
@ -66,18 +78,6 @@ namespace osu.Game.Beatmaps
|
||||
[JsonIgnore]
|
||||
public bool Hidden { get; set; }
|
||||
|
||||
public BeatmapInfo(RulesetInfo ruleset, BeatmapDifficulty difficulty, BeatmapMetadata metadata)
|
||||
{
|
||||
Ruleset = ruleset;
|
||||
Difficulty = difficulty;
|
||||
Metadata = metadata;
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public BeatmapInfo() // TODO: this bypasses null safeties. needs to be hidden from user api (only should be used by realm).
|
||||
{
|
||||
}
|
||||
|
||||
#region Properties we may not want persisted (but also maybe no harm?)
|
||||
|
||||
public double AudioLeadIn { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user