2019-05-06 02:07:55 +08:00
|
|
|
|
// 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 osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Graphics;
|
2020-12-25 12:38:11 +08:00
|
|
|
|
using osu.Game.Online.Rooms;
|
2020-01-03 23:22:33 +08:00
|
|
|
|
using osu.Game.Rulesets;
|
2019-05-06 02:07:55 +08:00
|
|
|
|
using osuTK.Graphics;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Users
|
|
|
|
|
{
|
|
|
|
|
public abstract class UserActivity
|
|
|
|
|
{
|
|
|
|
|
public abstract string Status { get; }
|
|
|
|
|
public virtual Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDarker;
|
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class Modding : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
|
|
|
|
public override string Status => "Modding a map";
|
|
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class ChoosingBeatmap : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
|
|
|
|
public override string Status => "Choosing a beatmap";
|
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class MultiplayerGame : UserActivity
|
2019-05-06 02:07:55 +08:00
|
|
|
|
{
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public override string Status => "Playing with others";
|
2019-05-06 02:07:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class Editing : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
2019-06-12 15:33:15 +08:00
|
|
|
|
public BeatmapInfo Beatmap { get; }
|
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public Editing(BeatmapInfo info)
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
|
|
|
|
Beatmap = info;
|
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
|
2019-05-12 23:38:02 +08:00
|
|
|
|
public override string Status => @"Editing a beatmap";
|
2019-05-06 02:07:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class SoloGame : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
2019-06-12 15:33:15 +08:00
|
|
|
|
public BeatmapInfo Beatmap { get; }
|
|
|
|
|
|
2020-01-03 23:22:33 +08:00
|
|
|
|
public RulesetInfo Ruleset { get; }
|
2019-06-12 15:33:15 +08:00
|
|
|
|
|
2020-01-03 23:22:33 +08:00
|
|
|
|
public SoloGame(BeatmapInfo info, RulesetInfo ruleset)
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
|
|
|
|
Beatmap = info;
|
|
|
|
|
Ruleset = ruleset;
|
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
|
2020-01-03 23:22:33 +08:00
|
|
|
|
public override string Status => Ruleset.CreateInstance().PlayingVerb;
|
2019-05-12 23:38:02 +08:00
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class Spectating : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
|
|
|
|
public override string Status => @"Spectating a game";
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 20:21:21 +08:00
|
|
|
|
public class SearchingForLobby : UserActivity
|
|
|
|
|
{
|
|
|
|
|
public override string Status => @"Looking for a lobby";
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-12 01:41:48 +08:00
|
|
|
|
public class InLobby : UserActivity
|
2019-05-12 23:38:02 +08:00
|
|
|
|
{
|
2019-12-18 13:07:21 +08:00
|
|
|
|
public override string Status => @"In a multiplayer lobby";
|
2020-11-08 20:21:21 +08:00
|
|
|
|
|
|
|
|
|
public readonly Room Room;
|
|
|
|
|
|
|
|
|
|
public InLobby(Room room)
|
|
|
|
|
{
|
|
|
|
|
Room = room;
|
|
|
|
|
}
|
2019-05-12 23:38:02 +08:00
|
|
|
|
}
|
2019-05-06 02:07:55 +08:00
|
|
|
|
}
|
|
|
|
|
}
|