1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 21:32: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:
Lucas A 2019-04-14 22:18:57 +02:00
parent 1b1ebb7fd9
commit b38160177a

View File

@ -15,7 +15,7 @@ namespace osu.Desktop
{ {
internal class DiscordRichPresenceClient : Component internal class DiscordRichPresenceClient : Component
{ {
private const string client_id = "559391129716391967"; private const string client_id = "563024054391537674";
private Bindable<User> user; private Bindable<User> user;
@ -54,7 +54,9 @@ namespace osu.Desktop
break; break;
case UserStatusEditing editing: 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; break;
} }
@ -80,6 +82,10 @@ namespace osu.Desktop
case 3: case 3:
presence.Assets.SmallImageKey = "mania"; presence.Assets.SmallImageKey = "mania";
break; break;
default:
presence.Assets.SmallImageKey = "unknown";
break;
} }
presence.Assets.SmallImageText = ruleset.ShortName; presence.Assets.SmallImageText = ruleset.ShortName;