1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Extract interface

This commit is contained in:
Dean Herbert 2021-10-28 17:57:17 +09:00
parent 817369903a
commit 49b5de64be
2 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,42 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Users;
namespace osu.Game.Scoring
{
public interface IScoreInfo : IHasOnlineID<long>
{
int TotalScore { get; set; }
int MaxCombo { get; set; }
User User { get; set; }
long OnlineScoreID { get; set; }
bool Replay { get; set; }
DateTimeOffset Date { get; set; }
BeatmapInfo BeatmapInfo { get; set; }
double Accuracy { get; set; }
double? PP { get; set; }
BeatmapMetadata Metadata { get; set; }
Dictionary<string, int> Statistics { get; set; }
int OnlineRulesetID { get; set; }
string[] Mods { get; set; }
public ScoreRank Rank { get; set; }
}
}

View File

@ -19,7 +19,7 @@ using osu.Game.Utils;
namespace osu.Game.Scoring
{
public class ScoreInfo : IHasFiles<ScoreFileInfo>, IHasPrimaryKey, ISoftDelete, IEquatable<ScoreInfo>, IDeepCloneable<ScoreInfo>, IHasOnlineID<long>
public class ScoreInfo : IScoreInfo, IHasFiles<ScoreFileInfo>, IHasPrimaryKey, ISoftDelete, IEquatable<ScoreInfo>, IDeepCloneable<ScoreInfo>
{
public int ID { get; set; }
@ -54,7 +54,7 @@ namespace osu.Game.Scoring
public bool Passed { get; set; } = true;
[JsonIgnore]
public virtual RulesetInfo Ruleset { get; set; }
public RulesetInfo Ruleset { get; set; }
private APIMod[] localAPIMods;
private Mod[] mods;