From 3d5ed24e206a43990f36880464917045e8cdf2be Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 17 Feb 2022 21:04:59 +0900 Subject: [PATCH 1/2] Fix beatmap overlay leaderboards and links not working Completely aware that this isn't how it should be done, but would like to get this out in a hotfix release today. Maybe changes opinions on https://github.com/ppy/osu/pull/16890 structure? --- .../API/Requests/Responses/APIBeatmap.cs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs index dca60e54cb..c53fab48ae 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs @@ -112,7 +112,27 @@ namespace osu.Game.Online.API.Requests.Responses public int OnlineID { get; set; } = -1; public string Name => $@"{nameof(APIRuleset)} (ID: {OnlineID})"; - public string ShortName => nameof(APIRuleset); + + public string ShortName + { + get + { + // TODO: this should really not exist. + switch (OnlineID) + { + case 0: return "osu"; + + case 1: return "taiko"; + + case 2: return "catch"; + + case 3: return "fruits"; + + default: throw new ArgumentOutOfRangeException(); + } + } + } + public string InstantiationInfo => string.Empty; public Ruleset CreateInstance() => throw new NotImplementedException(); From 9d0023c750a85c2cc78a6d6d5004f50231916a92 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 17 Feb 2022 21:12:51 +0900 Subject: [PATCH 2/2] Fix incorrect mappings --- osu.Game/Online/API/Requests/Responses/APIBeatmap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs index c53fab48ae..f5795141c5 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs @@ -124,9 +124,9 @@ namespace osu.Game.Online.API.Requests.Responses case 1: return "taiko"; - case 2: return "catch"; + case 2: return "fruits"; - case 3: return "fruits"; + case 3: return "mania"; default: throw new ArgumentOutOfRangeException(); }