mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Apply newline additions
This commit is contained in:
@ -113,6 +113,7 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case APIState.Offline:
|
||||
case APIState.Connecting:
|
||||
//work to restore a connection...
|
||||
@ -300,6 +301,7 @@ namespace osu.Game.Online.API
|
||||
case HttpStatusCode.Unauthorized:
|
||||
Logout();
|
||||
return true;
|
||||
|
||||
case HttpStatusCode.RequestTimeout:
|
||||
failureCount++;
|
||||
log.Add($@"API failure count is now {failureCount}");
|
||||
|
@ -72,26 +72,33 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
foreach (var kvp in value)
|
||||
{
|
||||
HitResult newKey;
|
||||
|
||||
switch (kvp.Key)
|
||||
{
|
||||
case @"count_geki":
|
||||
CountGeki = kvp.Value;
|
||||
break;
|
||||
|
||||
case @"count_300":
|
||||
Count300 = kvp.Value;
|
||||
break;
|
||||
|
||||
case @"count_katu":
|
||||
CountKatu = kvp.Value;
|
||||
break;
|
||||
|
||||
case @"count_100":
|
||||
Count100 = kvp.Value;
|
||||
break;
|
||||
|
||||
case @"count_50":
|
||||
Count50 = kvp.Value;
|
||||
break;
|
||||
|
||||
case @"count_miss":
|
||||
CountMiss = kvp.Value;
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ namespace osu.Game.Online.Chat
|
||||
private static void handleMatches(Regex regex, string display, string link, MessageFormatterResult result, int startIndex = 0, LinkAction? linkActionOverride = null)
|
||||
{
|
||||
int captureOffset = 0;
|
||||
|
||||
foreach (Match m in regex.Matches(result.Text, startIndex))
|
||||
{
|
||||
var index = m.Index - captureOffset;
|
||||
@ -114,51 +115,63 @@ namespace osu.Game.Online.Chat
|
||||
case "b":
|
||||
case "beatmaps":
|
||||
return new LinkDetails(LinkAction.OpenBeatmap, args[3]);
|
||||
|
||||
case "s":
|
||||
case "beatmapsets":
|
||||
case "d":
|
||||
return new LinkDetails(LinkAction.OpenBeatmapSet, args[3]);
|
||||
|
||||
case "u":
|
||||
return new LinkDetails(LinkAction.OpenUserProfile, args[3]);
|
||||
}
|
||||
}
|
||||
|
||||
return new LinkDetails(LinkAction.External, null);
|
||||
|
||||
case "osu":
|
||||
// every internal link also needs some kind of argument
|
||||
if (args.Length < 3)
|
||||
return new LinkDetails(LinkAction.External, null);
|
||||
|
||||
LinkAction linkType;
|
||||
|
||||
switch (args[1])
|
||||
{
|
||||
case "chan":
|
||||
linkType = LinkAction.OpenChannel;
|
||||
break;
|
||||
|
||||
case "edit":
|
||||
linkType = LinkAction.OpenEditorTimestamp;
|
||||
break;
|
||||
|
||||
case "b":
|
||||
linkType = LinkAction.OpenBeatmap;
|
||||
break;
|
||||
|
||||
case "s":
|
||||
case "dl":
|
||||
linkType = LinkAction.OpenBeatmapSet;
|
||||
break;
|
||||
|
||||
case "spectate":
|
||||
linkType = LinkAction.Spectate;
|
||||
break;
|
||||
|
||||
case "u":
|
||||
linkType = LinkAction.OpenUserProfile;
|
||||
break;
|
||||
|
||||
default:
|
||||
linkType = LinkAction.External;
|
||||
break;
|
||||
}
|
||||
|
||||
return new LinkDetails(linkType, args[2]);
|
||||
|
||||
case "osump":
|
||||
return new LinkDetails(LinkAction.JoinMultiplayerMatch, args[1]);
|
||||
|
||||
default:
|
||||
return new LinkDetails(LinkAction.External, null);
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ namespace osu.Game.Online.Leaderboards
|
||||
scrollContainer.Add(scrollFlow);
|
||||
|
||||
int i = 0;
|
||||
|
||||
foreach (var s in scrollFlow.Children)
|
||||
{
|
||||
using (s.BeginDelayedSequence(i++ * 50, true))
|
||||
@ -138,18 +139,23 @@ namespace osu.Game.Online.Leaderboards
|
||||
OnRetry = UpdateScores,
|
||||
});
|
||||
break;
|
||||
|
||||
case PlaceholderState.Unavailable:
|
||||
replacePlaceholder(new MessagePlaceholder(@"Leaderboards are not available for this beatmap!"));
|
||||
break;
|
||||
|
||||
case PlaceholderState.NoScores:
|
||||
replacePlaceholder(new MessagePlaceholder(@"No records yet!"));
|
||||
break;
|
||||
|
||||
case PlaceholderState.NotLoggedIn:
|
||||
replacePlaceholder(new MessagePlaceholder(@"Please sign in to view online leaderboards!"));
|
||||
break;
|
||||
|
||||
case PlaceholderState.NotSupporter:
|
||||
replacePlaceholder(new MessagePlaceholder(@"Please invest in an osu!supporter tag to view this leaderboard!"));
|
||||
break;
|
||||
|
||||
default:
|
||||
replacePlaceholder(null);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user