mirror of
https://github.com/ppy/osu
synced 2025-01-05 05:39:49 +00:00
Move guid initialisation to database model itself
This commit is contained in:
parent
2c1422b4f9
commit
8961203f08
@ -12,7 +12,7 @@ namespace osu.Game.Input.Bindings
|
|||||||
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey, IKeyBinding
|
public class RealmKeyBinding : RealmObject, IHasGuidPrimaryKey, IKeyBinding
|
||||||
{
|
{
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public Guid ID { get; set; }
|
public Guid ID { get; set; } = Guid.NewGuid();
|
||||||
|
|
||||||
public int? RulesetID { get; set; }
|
public int? RulesetID { get; set; }
|
||||||
|
|
||||||
|
@ -74,7 +74,6 @@ namespace osu.Game.Input
|
|||||||
// insert any defaults which are missing.
|
// insert any defaults which are missing.
|
||||||
usage.Realm.Add(new RealmKeyBinding
|
usage.Realm.Add(new RealmKeyBinding
|
||||||
{
|
{
|
||||||
ID = Guid.NewGuid(),
|
|
||||||
KeyCombinationString = k.KeyCombination.ToString(),
|
KeyCombinationString = k.KeyCombination.ToString(),
|
||||||
ActionInt = (int)k.Action,
|
ActionInt = (int)k.Action,
|
||||||
RulesetID = rulesetId,
|
RulesetID = rulesetId,
|
||||||
|
@ -370,7 +370,6 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
usage.Realm.Add(new RealmKeyBinding
|
usage.Realm.Add(new RealmKeyBinding
|
||||||
{
|
{
|
||||||
ID = Guid.NewGuid(),
|
|
||||||
KeyCombinationString = dkb.KeyCombination.ToString(),
|
KeyCombinationString = dkb.KeyCombination.ToString(),
|
||||||
ActionInt = (int)dkb.Action,
|
ActionInt = (int)dkb.Action,
|
||||||
RulesetID = dkb.RulesetID,
|
RulesetID = dkb.RulesetID,
|
||||||
|
Loading…
Reference in New Issue
Block a user