1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 06:13:04 +08:00

Fix initialization of BeatmapInfo

This commit is contained in:
Drew DeVault 2016-10-19 13:13:14 -04:00
parent 3ee0bf2b80
commit 8d4a211419
3 changed files with 8 additions and 7 deletions

View File

@ -214,7 +214,11 @@ namespace osu.Game.Beatmaps.Formats
HitObjects = new List<HitObject>(), HitObjects = new List<HitObject>(),
ControlPoints = new List<ControlPoint>(), ControlPoints = new List<ControlPoint>(),
ComboColors = new List<Color4>(), ComboColors = new List<Color4>(),
BeatmapInfo = new BeatmapInfo(), BeatmapInfo = new BeatmapInfo
{
Metadata = new BeatmapMetadata(),
BaseDifficulty = new BaseDifficulty(),
},
}; };
var section = Section.None; var section = Section.None;

View File

@ -1,4 +1,5 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;

View File

@ -9,16 +9,12 @@ namespace osu.Game.Database
{ {
public class BeatmapInfo public class BeatmapInfo
{ {
public BeatmapInfo()
{
BaseDifficulty = new BaseDifficulty();
Metadata = new BeatmapMetadata();
}
[PrimaryKey] [PrimaryKey]
public int BeatmapID { get; set; } public int BeatmapID { get; set; }
[ForeignKey(typeof(BeatmapSetInfo)), NotNull] [ForeignKey(typeof(BeatmapSetInfo)), NotNull]
public int BeatmapSetID { get; set; } public int BeatmapSetID { get; set; }
[ManyToOne]
public BeatmapSetInfo BeatmapSet { get; set; }
[ForeignKey(typeof(BeatmapMetadata))] [ForeignKey(typeof(BeatmapMetadata))]
public int BeatmapMetadataID { get; set; } public int BeatmapMetadataID { get; set; }
[ForeignKey(typeof(BaseDifficulty)), NotNull] [ForeignKey(typeof(BaseDifficulty)), NotNull]