mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Moved all online score related parsing to its own class
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -28,27 +27,9 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
public int Combo { get; set; }
|
||||
|
||||
[JsonProperty(@"mods")]
|
||||
private string[] modStrings { get; set; }
|
||||
|
||||
public RulesetInfo Ruleset;
|
||||
|
||||
private Mod[] mods;
|
||||
public Mod[] Mods
|
||||
{
|
||||
get
|
||||
{
|
||||
// Evaluate the mod strings if necessary
|
||||
return mods ?? (mods = Ruleset.CreateInstance().GetAllMods().Where(mod => modStrings.Contains(mod.ShortenedName)).ToArray());
|
||||
}
|
||||
set
|
||||
{
|
||||
mods = value;
|
||||
|
||||
// Assign the mod strings
|
||||
modStrings = mods.Select(mod => mod.ShortenedName).ToArray();
|
||||
}
|
||||
}
|
||||
public Mod[] Mods;
|
||||
|
||||
[JsonProperty(@"user")]
|
||||
public User User;
|
||||
|
Reference in New Issue
Block a user