mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into fix-d-rank
This commit is contained in:
@ -45,7 +45,7 @@ namespace osu.Game.Scoring.Legacy
|
||||
currentBeatmap = workingBeatmap.Beatmap;
|
||||
score.ScoreInfo.Beatmap = currentBeatmap.BeatmapInfo;
|
||||
|
||||
score.ScoreInfo.User = score.Replay.User = new User { Username = sr.ReadString() };
|
||||
score.ScoreInfo.User = new User { Username = sr.ReadString() };
|
||||
|
||||
// MD5Hash
|
||||
sr.ReadString();
|
||||
|
@ -44,7 +44,8 @@ namespace osu.Game.Scoring
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mods != null) return mods;
|
||||
if (mods != null)
|
||||
return mods;
|
||||
|
||||
if (modsJson == null)
|
||||
return Array.Empty<Mod>();
|
||||
@ -65,7 +66,16 @@ namespace osu.Game.Scoring
|
||||
[Column("Mods")]
|
||||
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
|
||||
{
|
||||
modsJson = value;
|
||||
|
@ -57,6 +57,8 @@ namespace osu.Game.Scoring
|
||||
|
||||
public List<ScoreInfo> GetAllUsableScores() => ModelStore.ConsumableItems.Where(s => !s.DeletePending).ToList();
|
||||
|
||||
public IEnumerable<ScoreInfo> QueryScores(Expression<Func<ScoreInfo, bool>> query) => ModelStore.ConsumableItems.AsNoTracking().Where(query);
|
||||
|
||||
public ScoreInfo Query(Expression<Func<ScoreInfo, bool>> query) => ModelStore.ConsumableItems.AsNoTracking().FirstOrDefault(query);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user