mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Merge pull request #7430 from aspriddell/rpc
Add playing verb to Ruleset and use it for Discord RPC
This commit is contained in:
commit
c73512a51c
@ -135,6 +135,8 @@ namespace osu.Game.Rulesets.Catch
|
||||
|
||||
public override string ShortName => SHORT_NAME;
|
||||
|
||||
public override string PlayingVerb => "Catching fruit";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = OsuIcon.RulesetCatch };
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new CatchDifficultyCalculator(this, beatmap);
|
||||
|
@ -179,6 +179,8 @@ namespace osu.Game.Rulesets.Mania
|
||||
|
||||
public override string ShortName => SHORT_NAME;
|
||||
|
||||
public override string PlayingVerb => "Smashing keys";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = OsuIcon.RulesetMania };
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new ManiaDifficultyCalculator(this, beatmap);
|
||||
|
@ -175,6 +175,8 @@ namespace osu.Game.Rulesets.Osu
|
||||
|
||||
public override string ShortName => SHORT_NAME;
|
||||
|
||||
public override string PlayingVerb => "Clicking circles";
|
||||
|
||||
public override RulesetSettingsSubsection CreateSettings() => new OsuSettingsSubsection(this);
|
||||
|
||||
public override ISkin CreateLegacySkinProvider(ISkinSource source) => new OsuLegacySkinTransformer(source);
|
||||
|
@ -139,6 +139,8 @@ namespace osu.Game.Rulesets.Taiko
|
||||
|
||||
public override string ShortName => SHORT_NAME;
|
||||
|
||||
public override string PlayingVerb => "Bashing drums";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = OsuIcon.RulesetTaiko };
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new TaikoDifficultyCalculator(this, beatmap);
|
||||
|
@ -21,6 +21,7 @@ using osu.Game.Rulesets.Difficulty;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Rulesets
|
||||
{
|
||||
@ -57,7 +58,7 @@ namespace osu.Game.Rulesets
|
||||
ShortName = ShortName,
|
||||
ID = (this as ILegacyRuleset)?.LegacyID,
|
||||
InstantiationInfo = GetType().AssemblyQualifiedName,
|
||||
Available = true
|
||||
Available = true,
|
||||
};
|
||||
}
|
||||
|
||||
@ -121,6 +122,11 @@ namespace osu.Game.Rulesets
|
||||
/// </summary>
|
||||
public abstract string ShortName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The playing verb to be shown in the <see cref="UserActivity.SoloGame.Status"/>.
|
||||
/// </summary>
|
||||
public virtual string PlayingVerb => "Playing solo";
|
||||
|
||||
/// <summary>
|
||||
/// A list of available variant ids.
|
||||
/// </summary>
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Users
|
||||
@ -44,15 +45,15 @@ namespace osu.Game.Users
|
||||
{
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
|
||||
public Rulesets.RulesetInfo Ruleset { get; }
|
||||
public RulesetInfo Ruleset { get; }
|
||||
|
||||
public SoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||
public SoloGame(BeatmapInfo info, RulesetInfo ruleset)
|
||||
{
|
||||
Beatmap = info;
|
||||
Ruleset = ruleset;
|
||||
}
|
||||
|
||||
public override string Status => @"Playing alone";
|
||||
public override string Status => Ruleset.CreateInstance().PlayingVerb;
|
||||
}
|
||||
|
||||
public class Spectating : UserActivity
|
||||
|
Loading…
Reference in New Issue
Block a user