mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Add some more icons to rich presence + prevent rich presence from displaying empty brackets when current beatmap doesn't have a version (trying to edit osu! main menu theme music ?)
This commit is contained in:
parent
1b1ebb7fd9
commit
b38160177a
@ -15,7 +15,7 @@ namespace osu.Desktop
|
||||
{
|
||||
internal class DiscordRichPresenceClient : Component
|
||||
{
|
||||
private const string client_id = "559391129716391967";
|
||||
private const string client_id = "563024054391537674";
|
||||
|
||||
private Bindable<User> user;
|
||||
|
||||
@ -54,7 +54,9 @@ namespace osu.Desktop
|
||||
break;
|
||||
|
||||
case UserStatusEditing editing:
|
||||
presence.State = $"{editing.Beatmap.Metadata.Artist} - {editing.Beatmap.Metadata.Title}" + (editing.Beatmap.Version != null ? $"[{editing.Beatmap.Version}]" : "");
|
||||
presence.State = $"{editing.Beatmap.Metadata.Artist} - {editing.Beatmap.Metadata.Title} " + (!string.IsNullOrEmpty(editing.Beatmap.Version) ? $"[{editing.Beatmap.Version}]" : "");
|
||||
presence.Assets.SmallImageKey = "edit";
|
||||
presence.Assets.SmallImageText = "editing";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -80,6 +82,10 @@ namespace osu.Desktop
|
||||
case 3:
|
||||
presence.Assets.SmallImageKey = "mania";
|
||||
break;
|
||||
|
||||
default:
|
||||
presence.Assets.SmallImageKey = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
presence.Assets.SmallImageText = ruleset.ShortName;
|
||||
|
Loading…
Reference in New Issue
Block a user