1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:33:20 +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>(),
ControlPoints = new List<ControlPoint>(),
ComboColors = new List<Color4>(),
BeatmapInfo = new BeatmapInfo(),
BeatmapInfo = new BeatmapInfo
{
Metadata = new BeatmapMetadata(),
BaseDifficulty = new BaseDifficulty(),
},
};
var section = Section.None;

View File

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

View File

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