mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Merge pull request #3785 from smoogipoo/local-score-saving
Save local scores when completing beatmaps
This commit is contained in:
commit
97c4ee3342
@ -44,7 +44,8 @@ namespace osu.Game.Scoring
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (mods != null) return mods;
|
if (mods != null)
|
||||||
|
return mods;
|
||||||
|
|
||||||
if (modsJson == null)
|
if (modsJson == null)
|
||||||
return Array.Empty<Mod>();
|
return Array.Empty<Mod>();
|
||||||
@ -65,7 +66,16 @@ namespace osu.Game.Scoring
|
|||||||
[Column("Mods")]
|
[Column("Mods")]
|
||||||
public string ModsJson
|
public string ModsJson
|
||||||
{
|
{
|
||||||
get => modsJson ?? (modsJson = JsonConvert.SerializeObject(mods));
|
get
|
||||||
|
{
|
||||||
|
if (modsJson != null)
|
||||||
|
return modsJson;
|
||||||
|
|
||||||
|
if (mods == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return modsJson = JsonConvert.SerializeObject(mods);
|
||||||
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
modsJson = value;
|
modsJson = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user