mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 05:52:56 +08:00
feat: actually support status also for Replays
This commit is contained in:
parent
d5b2d9ce97
commit
bf273597ea
@ -15,6 +15,7 @@ using osu.Game.Rulesets.Mods;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -24,6 +25,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private readonly bool replayIsFailedScore;
|
private readonly bool replayIsFailedScore;
|
||||||
|
|
||||||
|
protected override UserActivity InitialActivity => new UserActivity.Watching();
|
||||||
|
|
||||||
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
|
||||||
protected override bool CheckModsAllowFailure()
|
protected override bool CheckModsAllowFailure()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
private readonly Score score;
|
private readonly Score score;
|
||||||
|
|
||||||
protected override UserActivity InitialActivity => new UserActivity.Spectating(score.ScoreInfo.User);
|
protected override UserActivity InitialActivity => new UserActivity.Spectating();
|
||||||
|
|
||||||
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
|
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
|
||||||
: base(score, configuration)
|
: base(score, configuration)
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -91,16 +90,17 @@ namespace osu.Game.Users
|
|||||||
public override string Status => @"Editing a beatmap";
|
public override string Status => @"Editing a beatmap";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Spectating : UserActivity
|
public class Watching : UserActivity
|
||||||
{
|
{
|
||||||
private readonly APIUser user;
|
protected virtual string Verb => @"Watching";
|
||||||
|
|
||||||
public Spectating(APIUser user)
|
public override string Status => @$"{Verb} a game";
|
||||||
{
|
}
|
||||||
this.user = user;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Status => @$"Spectating {user.Username}";
|
public class Spectating : Watching
|
||||||
|
{
|
||||||
|
protected override string Verb => @"Spectating";
|
||||||
|
public override string Status => @$"{Verb} a game";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SearchingForLobby : UserActivity
|
public class SearchingForLobby : UserActivity
|
||||||
|
Loading…
Reference in New Issue
Block a user