2019-05-05 18:07:55 +00: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 04:38:11 +00:00
|
|
|
|
using osu.Game.Online.Rooms;
|
2020-01-03 15:22:33 +00:00
|
|
|
|
using osu.Game.Rulesets;
|
2019-05-05 18:07:55 +00: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-11 17:41:48 +00:00
|
|
|
|
public class Modding : UserActivity
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
|
|
|
|
public override string Status => "Modding a map";
|
|
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
|
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
|
2019-06-11 17:41:48 +00:00
|
|
|
|
public class ChoosingBeatmap : UserActivity
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
|
|
|
|
public override string Status => "Choosing a beatmap";
|
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
|
2021-08-18 00:13:53 +00:00
|
|
|
|
public abstract class InGame : UserActivity
|
2019-05-05 18:07:55 +00:00
|
|
|
|
{
|
2021-11-15 09:46:11 +00:00
|
|
|
|
public IBeatmapInfo BeatmapInfo { get; }
|
2021-08-15 22:32:33 +00:00
|
|
|
|
|
2021-12-03 09:14:44 +00:00
|
|
|
|
public IRulesetInfo Ruleset { get; }
|
2021-08-15 22:32:33 +00:00
|
|
|
|
|
2021-12-03 09:14:44 +00:00
|
|
|
|
protected InGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
|
2021-08-15 22:32:33 +00:00
|
|
|
|
{
|
2021-10-02 15:55:29 +00:00
|
|
|
|
BeatmapInfo = beatmapInfo;
|
2021-08-15 22:32:33 +00:00
|
|
|
|
Ruleset = ruleset;
|
|
|
|
|
}
|
2021-08-15 23:06:23 +00:00
|
|
|
|
|
|
|
|
|
public override string Status => Ruleset.CreateInstance().PlayingVerb;
|
2021-08-15 22:32:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class InMultiplayerGame : InGame
|
|
|
|
|
{
|
2021-12-03 09:14:44 +00:00
|
|
|
|
public InMultiplayerGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
|
2021-10-02 15:55:29 +00:00
|
|
|
|
: base(beatmapInfo, ruleset)
|
2021-08-14 05:20:36 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-15 23:06:23 +00:00
|
|
|
|
public override string Status => $@"{base.Status} with others";
|
2019-05-05 18:07:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-02-25 07:03:46 +00:00
|
|
|
|
public class SpectatingMultiplayerGame : InGame
|
|
|
|
|
{
|
|
|
|
|
public SpectatingMultiplayerGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
|
|
|
|
|
: base(beatmapInfo, ruleset)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Status => $"Watching others {base.Status.ToLowerInvariant()}";
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-22 01:54:07 +00:00
|
|
|
|
public class InPlaylistGame : InGame
|
|
|
|
|
{
|
2021-12-03 09:14:44 +00:00
|
|
|
|
public InPlaylistGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
|
2021-10-02 15:55:29 +00:00
|
|
|
|
: base(beatmapInfo, ruleset)
|
2021-08-22 01:54:07 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-15 22:32:33 +00:00
|
|
|
|
public class InSoloGame : InGame
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
2021-12-03 09:14:44 +00:00
|
|
|
|
public InSoloGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
|
2021-10-02 15:55:29 +00:00
|
|
|
|
: base(beatmapInfo, ruleset)
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-15 22:32:33 +00:00
|
|
|
|
public class Editing : UserActivity
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
2021-11-15 09:46:11 +00:00
|
|
|
|
public IBeatmapInfo BeatmapInfo { get; }
|
2019-06-12 07:33:15 +00:00
|
|
|
|
|
2021-11-15 09:46:11 +00:00
|
|
|
|
public Editing(IBeatmapInfo info)
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
2021-10-02 15:55:29 +00:00
|
|
|
|
BeatmapInfo = info;
|
2019-05-12 15:38:02 +00:00
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
|
2021-08-15 22:32:33 +00:00
|
|
|
|
public override string Status => @"Editing a beatmap";
|
2019-05-12 15:38:02 +00:00
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
|
2019-06-11 17:41:48 +00:00
|
|
|
|
public class Spectating : UserActivity
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
|
|
|
|
public override string Status => @"Spectating a game";
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 12:21:21 +00:00
|
|
|
|
public class SearchingForLobby : UserActivity
|
|
|
|
|
{
|
|
|
|
|
public override string Status => @"Looking for a lobby";
|
|
|
|
|
}
|
|
|
|
|
|
2019-06-11 17:41:48 +00:00
|
|
|
|
public class InLobby : UserActivity
|
2019-05-12 15:38:02 +00:00
|
|
|
|
{
|
2021-08-14 14:39:12 +00:00
|
|
|
|
public override string Status => @"In a lobby";
|
2020-11-08 12:21:21 +00:00
|
|
|
|
|
|
|
|
|
public readonly Room Room;
|
|
|
|
|
|
|
|
|
|
public InLobby(Room room)
|
|
|
|
|
{
|
|
|
|
|
Room = room;
|
|
|
|
|
}
|
2019-05-12 15:38:02 +00:00
|
|
|
|
}
|
2019-05-05 18:07:55 +00:00
|
|
|
|
}
|
|
|
|
|
}
|