mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Simplify scope logic
This commit is contained in:
parent
63dce59c8c
commit
1b91f24044
@ -56,22 +56,7 @@ namespace osu.Game.Online.API.Requests
|
||||
{
|
||||
var req = base.CreateWebRequest();
|
||||
|
||||
switch(scope)
|
||||
{
|
||||
default:
|
||||
case LeaderboardScope.Global:
|
||||
req.AddParameter(@"type", @"global");
|
||||
break;
|
||||
|
||||
case LeaderboardScope.Friends:
|
||||
req.AddParameter(@"type", @"friend");
|
||||
break;
|
||||
|
||||
case LeaderboardScope.Country:
|
||||
req.AddParameter(@"type", @"country");
|
||||
break;
|
||||
}
|
||||
|
||||
req.AddParameter(@"type", scope.ToString().ToLowerInvariant());
|
||||
req.AddParameter(@"mode", ruleset?.ShortName ?? @"osu");
|
||||
|
||||
return req;
|
||||
|
@ -355,6 +355,6 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
Local,
|
||||
Country,
|
||||
Global,
|
||||
Friends,
|
||||
Friend,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user