1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 09:23:06 +08:00

Apply more cases/fix some existing ones

This commit is contained in:
smoogipoo 2019-05-07 13:23:09 +09:00
parent d7c09e7dbd
commit 13b9b04bb8
15 changed files with 25 additions and 9 deletions

View File

@ -32,6 +32,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
{
case HitResult.Miss:
return hpDrainRate;
default:
return 10.2 - hpDrainRate; // Award less HP as drain rate is increased
}

View File

@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Mania.Judgements
{
case HitResult.Miss:
return 0;
default:
return 0.040;
}

View File

@ -36,16 +36,22 @@ namespace osu.Game.Rulesets.Mania.Judgements
{
case HitResult.Miss:
return -0.125;
case HitResult.Meh:
return 0.005;
case HitResult.Ok:
return 0.010;
case HitResult.Good:
return 0.035;
case HitResult.Great:
return 0.055;
case HitResult.Perfect:
return 0.065;
default:
return 0;
}

View File

@ -85,11 +85,6 @@ namespace osu.Game.Rulesets.Mania.Scoring
protected override double HealthAdjustmentFactorFor(JudgementResult result)
=> result.Type == HitResult.Miss ? hpMissMultiplier : hpMultiplier;
public override HitWindows CreateHitWindows() => new ManiaHitWindows();
}
}

View File

@ -34,10 +34,12 @@ namespace osu.Game.Rulesets.Osu.Judgements
{
case HitResult.Miss:
return -0.02;
case HitResult.Meh:
case HitResult.Good:
case HitResult.Great:
return 0.01;
default:
return 0;
}

View File

@ -43,7 +43,6 @@ namespace osu.Game.Graphics
case Typeface.Exo:
return "Exo2.0";
case Typeface.Venera:
return "Venera";
}

View File

@ -70,7 +70,6 @@ namespace osu.Game.Online.API.Requests.Responses
{
foreach (var kvp in value)
{
switch (kvp.Key)
{
case @"count_geki":

View File

@ -107,6 +107,7 @@ namespace osu.Game.Overlays.Profile.Header
topLinkContainer.AddLink($@"{user.PostCount:#,##0} forum posts", $"https://osu.ppy.sh/users/{user.Id}/posts", creationParameters: embolden);
string websiteWithoutProtcol = user.Website;
if (!string.IsNullOrEmpty(websiteWithoutProtcol))
{
if (Uri.TryCreate(websiteWithoutProtcol, UriKind.Absolute, out var uri))

View File

@ -34,6 +34,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
content.Show();
iconContainer.Clear();
for (int i = 0; i < count; i++)
{
iconContainer.Add(new SpriteIcon

View File

@ -68,9 +68,11 @@ namespace osu.Game.Overlays.Profile.Header
{
var badges = user.Badges;
badgeFlowContainer.Clear();
if (badges?.Length > 0)
{
Show();
for (var index = 0; index < badges.Length; index++)
{
int displayIndex = index;

View File

@ -162,6 +162,7 @@ namespace osu.Game.Overlays.Profile.Header
titleText.Colour = OsuColour.FromHex(user?.Colour ?? "fff");
userStats.Clear();
if (user?.Statistics != null)
{
userStats.Add(new UserStatsLine("Ranked Score", user.Statistics.RankedScore.ToString("#,##0")));

View File

@ -135,7 +135,6 @@ namespace osu.Game.Overlays.Profile
}
private class ProfileHeaderTitle : ScreenTitle
{
public ProfileHeaderTitle()
{
@ -145,8 +144,9 @@ namespace osu.Game.Overlays.Profile
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
AccentColour = colours.CommunityUserGreen;
}
}
}
}

View File

@ -46,8 +46,10 @@ namespace osu.Game.Rulesets.Mods
{
case ScoreRank.X:
return ScoreRank.XH;
case ScoreRank.S:
return ScoreRank.SH;
default:
return rank;
}

View File

@ -67,6 +67,7 @@ namespace osu.Game.Rulesets.UI
private void load()
{
Cursor = CreateCursor();
if (Cursor != null)
{
// initial showing of the cursor will be handed by MenuCursorContainer (via DrawableRuleset's IProvideCursor implementation).

View File

@ -85,14 +85,19 @@ namespace osu.Game.Users
{
case ScoreRank.XH:
return SSPlus;
case ScoreRank.X:
return SS;
case ScoreRank.SH:
return SPlus;
case ScoreRank.S:
return S;
case ScoreRank.A:
return A;
default:
throw new ArgumentException($"API does not return {rank.ToString()}");
}