2 Commits

Author SHA1 Message Date
ab51579c27 added quit w/ replay button to pause menu; minor visual changes for ranks 2025-11-10 22:39:10 +03:00
d8e977c05f minor changes to mod scoring, all mods are ranked now
Probably all user-playable mods are ranked by default now,
Mania key mods were reverted to 1.0x score multiplier
2025-11-10 18:52:07 +03:00
16 changed files with 71 additions and 31 deletions

View File

@@ -14,8 +14,8 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Acronym => Name; public override string Acronym => Name;
public abstract int KeyCount { get; } public abstract int KeyCount { get; }
public override ModType Type => ModType.Conversion; public override ModType Type => ModType.Conversion;
public override double ScoreMultiplier => 0.9; public override double ScoreMultiplier => 1;
public override bool Ranked => UsesDefaultConfiguration; public override bool Ranked => true;
public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
{ {

View File

@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Acronym => "1K"; public override string Acronym => "1K";
public override IconUsage? Icon => OsuIcon.ModOneKey; public override IconUsage? Icon => OsuIcon.ModOneKey;
public override LocalisableString Description => @"Play with one key."; public override LocalisableString Description => @"Play with one key.";
public override bool Ranked => false;
} }
} }

View File

@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Acronym => "10K"; public override string Acronym => "10K";
public override IconUsage? Icon => OsuIcon.ModTenKeys; public override IconUsage? Icon => OsuIcon.ModTenKeys;
public override LocalisableString Description => @"Play with ten keys."; public override LocalisableString Description => @"Play with ten keys.";
public override bool Ranked => false;
} }
} }

View File

@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Acronym => "2K"; public override string Acronym => "2K";
public override IconUsage? Icon => OsuIcon.ModTwoKeys; public override IconUsage? Icon => OsuIcon.ModTwoKeys;
public override LocalisableString Description => @"Play with two keys."; public override LocalisableString Description => @"Play with two keys.";
public override bool Ranked => false;
} }
} }

View File

@@ -14,6 +14,5 @@ namespace osu.Game.Rulesets.Mania.Mods
public override string Acronym => "3K"; public override string Acronym => "3K";
public override IconUsage? Icon => OsuIcon.ModThreeKeys; public override IconUsage? Icon => OsuIcon.ModThreeKeys;
public override LocalisableString Description => @"Play with three keys."; public override LocalisableString Description => @"Play with three keys.";
public override bool Ranked => false;
} }
} }

View File

@@ -53,7 +53,7 @@ namespace osu.Game.Online.Leaderboards
Spacing = new Vector2(-3, 0), Spacing = new Vector2(-3, 0),
Padding = new MarginPadding { Top = -5 }, Padding = new MarginPadding { Top = -5 },
Colour = GetRankLetterColour(rank), Colour = GetRankLetterColour(rank),
Font = OsuFont.TorusAlternate.With(size: 42, weight: FontWeight.SemiBold), Font = OsuFont.TorusAlternate.With(size: 40, weight: FontWeight.Bold),
Text = GetRankLetter(rank), Text = GetRankLetter(rank),
ShadowColour = Color4.Black.Opacity(0.3f), ShadowColour = Color4.Black.Opacity(0.3f),
ShadowOffset = new Vector2(0, 0.08f), ShadowOffset = new Vector2(0, 0.08f),
@@ -72,12 +72,14 @@ namespace osu.Game.Online.Leaderboards
switch (rank) switch (rank)
{ {
case ScoreRank.SH: case ScoreRank.SH:
return @"S"; return @"S+";
case ScoreRank.X: case ScoreRank.X:
case ScoreRank.XH:
return @"SS"; return @"SS";
case ScoreRank.XH:
return @"SS+";
default: default:
return rank.ToString(); return rank.ToString();
} }

View File

@@ -1729,12 +1729,13 @@ namespace osu.Game
{ {
case IntroScreen intro: case IntroScreen intro:
introScreen = intro; introScreen = intro;
SimpleNotification notification = new SimpleNotification // SimpleNotification notification = new SimpleNotification
{ // {
Text = ButtonSystemStrings.GreetingNotification, // Text = ButtonSystemStrings.GreetingNotification,
Transient = true, // Transient = true,
}; // PopInSampleName = "",
Notifications?.Post(notification); // };
// Notifications?.Post(notification);
devBuildBanner?.Show(); devBuildBanner?.Show();
break; break;

View File

@@ -30,19 +30,19 @@ namespace osu.Game.Overlays
{ {
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Font = OsuFont.Torus.With(size: 12), Font = OsuFont.Torus.With(size: 15, weight: FontWeight.Bold),
Colour = colours.GrayF, Colour = colours.GrayF,
Text = $@"jvnkosu! " + game.Version, Text = $@"jvnkosu! " + game.Version + (game.IsDeployedBuild ? "" : " • Experimental version"),
Y = -12, Y = -3,
},
new OsuSpriteText
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 15),
Colour = colours.Yellow,
Text = "Experimental version",
}, },
// new OsuSpriteText
// {
// Anchor = Anchor.BottomCentre,
// Origin = Anchor.BottomCentre,
// Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 15),
// Colour = colours.Yellow,
// Text = "Experimental version",
// },
new Sprite new Sprite
{ {
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,

View File

@@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Mods
public virtual bool RequiresConfiguration => false; public virtual bool RequiresConfiguration => false;
[JsonIgnore] [JsonIgnore]
public virtual bool Ranked => false; public virtual bool Ranked => true;
/// <summary> /// <summary>
/// The mods this mod cannot be enabled with. /// The mods this mod cannot be enabled with.

View File

@@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Mods
public sealed override bool UserPlayable => false; public sealed override bool UserPlayable => false;
public sealed override bool ValidForMultiplayer => false; public sealed override bool ValidForMultiplayer => false;
public sealed override bool ValidForMultiplayerAsFreeMod => false; public sealed override bool ValidForMultiplayerAsFreeMod => false;
public override bool Ranked => false;
public override Type[] IncompatibleMods => new[] { typeof(ModCinema), typeof(ModRelax), typeof(ModAdaptiveSpeed), typeof(ModTouchDevice) }; public override Type[] IncompatibleMods => new[] { typeof(ModCinema), typeof(ModRelax), typeof(ModAdaptiveSpeed), typeof(ModTouchDevice) };

View File

@@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Mods
public override LocalisableString Description => "Watch the video without visual distractions."; public override LocalisableString Description => "Watch the video without visual distractions.";
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition) }).ToArray(); public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail), typeof(ModFailCondition) }).ToArray();
public override bool Ranked => false;
public void ApplyToHUD(HUDOverlay overlay) public void ApplyToHUD(HUDOverlay overlay)
{ {

View File

@@ -18,11 +18,13 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Utils; using osu.Game.Utils;
using System.Runtime.InteropServices;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
{ {
@@ -40,6 +42,7 @@ namespace osu.Game.Screens.Play
public Action? OnResume { get; init; } public Action? OnResume { get; init; }
public Action? OnRetry { get; init; } public Action? OnRetry { get; init; }
public Action? OnQuit { get; init; } public Action? OnQuit { get; init; }
public Action? OnQuitReplay { get; init; }
/// <summary> /// <summary>
/// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered. /// Action that is invoked when <see cref="GlobalAction.Back"/> is triggered.
@@ -69,6 +72,8 @@ namespace osu.Game.Screens.Play
[Resolved] [Resolved]
private GlobalActionContainer globalAction { get; set; } = null!; private GlobalActionContainer globalAction { get; set; } = null!;
private ShearedButton saveReplay { get; set; } = null!;
protected GameplayMenuOverlay() protected GameplayMenuOverlay()
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
@@ -90,7 +95,7 @@ namespace osu.Game.Screens.Play
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical, Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 50), Spacing = new Vector2(0, 25),
Origin = Anchor.Centre, Origin = Anchor.Centre,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Children = new Drawable[] Children = new Drawable[]
@@ -118,6 +123,15 @@ namespace osu.Game.Screens.Play
Radius = 50 Radius = 50
}, },
}, },
saveReplay = new ShearedButton
{
Text = "Quit and save replay",
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Height = 32,
Colour = colours.PurpleLight,
// Visibility = false
},
playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18)) playInfoText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.GetFont(size: 18))
{ {
Origin = Anchor.TopCentre, Origin = Anchor.TopCentre,
@@ -138,6 +152,12 @@ namespace osu.Game.Screens.Play
if (OnQuit != null) if (OnQuit != null)
AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke()); AddButton(GameplayMenuOverlayStrings.Quit, new Color4(170, 27, 39, 255), () => OnQuit.Invoke());
if (OnQuitReplay != null)
{
// saveReplay.Visibility = true;
saveReplay.Action = () => OnQuitReplay.Invoke();
}
State.ValueChanged += _ => InternalButtons.Deselect(); State.ValueChanged += _ => InternalButtons.Deselect();
updateInfoText(); updateInfoText();

View File

@@ -516,6 +516,7 @@ namespace osu.Game.Screens.Play
Retries = RestartCount, Retries = RestartCount,
OnRetry = () => Restart(), OnRetry = () => Restart(),
OnQuit = () => PerformExitWithConfirmation(), OnQuit = () => PerformExitWithConfirmation(),
OnQuitReplay = () => PerformExitReplay()
}, },
}, },
}; };
@@ -701,6 +702,20 @@ namespace osu.Game.Screens.Play
return true; return true;
} }
// XXX: replays saved from pause screen, when played back, will continue playing past the point player quits
// unfixable because it's not possible to manually trigger a failure in a way that would be recorded (w/o using a mod)
protected void PerformExitReplay()
{
// manually triggering a failure in a messy manner to avoid score submission
GameplayClockContainer.Stop();
GameplayState.HasFailed = true;
updateGameplayState();
ConcludeFailedScore(Score);
prepareAndImportScoreAsync(true);
PerformExit();
}
private void performUserRequestedSkip() private void performUserRequestedSkip()
{ {
// user requested skip // user requested skip

View File

@@ -49,7 +49,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
Spacing = new Vector2(-15, 0), Spacing = new Vector2(-15, 0),
Text = DrawableRank.GetRankLetter(rank), Text = DrawableRank.GetRankLetter(rank),
// Font = OsuFont.Numeric.With(size: 76), // Font = OsuFont.Numeric.With(size: 76),
Font = OsuFont.TorusAlternate.With(size: 128, weight: FontWeight.Bold), Font = OsuFont.TorusAlternate.With(size: 100, weight: FontWeight.Bold),
UseFullGlyphHeight = false UseFullGlyphHeight = false
}, },
superFlash = new BufferedContainer(cachedFrameBuffer: true) superFlash = new BufferedContainer(cachedFrameBuffer: true)
@@ -89,7 +89,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
Origin = Anchor.Centre, Origin = Anchor.Centre,
Spacing = new Vector2(-15, 0), Spacing = new Vector2(-15, 0),
Text = DrawableRank.GetRankLetter(rank), Text = DrawableRank.GetRankLetter(rank),
Font = OsuFont.Numeric.With(size: 76), Font = OsuFont.TorusAlternate.With(size: 100, weight: FontWeight.Bold),
UseFullGlyphHeight = false, UseFullGlyphHeight = false,
Shadow = false Shadow = false
}, },

View File

@@ -393,7 +393,7 @@ namespace osu.Game.Screens.SelectV2
Origin = Anchor.Centre, Origin = Anchor.Centre,
Spacing = new Vector2(-2), Spacing = new Vector2(-2),
Colour = DrawableRank.GetRankLetterColour(Score.Rank), Colour = DrawableRank.GetRankLetterColour(Score.Rank),
Font = OsuFont.Numeric.With(size: 14), Font = OsuFont.TorusAlternate.With(size: 24, weight: FontWeight.Bold),
Text = DrawableRank.GetRankLetter(Score.Rank), Text = DrawableRank.GetRankLetter(Score.Rank),
ShadowColour = Color4.Black.Opacity(0.3f), ShadowColour = Color4.Black.Opacity(0.3f),
ShadowOffset = new Vector2(0, 0.08f), ShadowOffset = new Vector2(0, 0.08f),

View File

@@ -770,6 +770,9 @@ namespace osu.Game.Users
[Description("Samoa")] [Description("Samoa")]
WS, WS,
[Description("Gensokyo")]
XG,
[Description("Kosovo")] [Description("Kosovo")]
XK, XK,