Make a RulesetDatabase.

This commit is contained in:
Dean Herbert
2017-04-17 17:43:48 +09:00
parent 83b083ce64
commit a4e2f34ee7
38 changed files with 298 additions and 201 deletions

View File

@ -3,7 +3,6 @@
using Newtonsoft.Json;
using osu.Game.IO.Serialization;
using osu.Game.Modes;
using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes;
using System;
@ -55,15 +54,12 @@ namespace osu.Game.Database
public float StackLeniency { get; set; }
public bool SpecialStyle { get; set; }
public int Mode { get; set; }
[ForeignKey(typeof(RulesetInfo))]
public int RulesetID { get; set; }
[OneToOne(CascadeOperations = CascadeOperation.All)]
public RulesetInfo Ruleset { get; set; }
[Ignore]
public Ruleset Ruleset
{
get { return RulesetCollection.GetRuleset(Mode); }
set { Mode = RulesetCollection.GetId(value); }
}
public bool LetterboxInBreaks { get; set; }
public bool WidescreenStoryboard { get; set; }