2 Commits

Author SHA1 Message Date
237e1828f8 add option for playing miss sound on any combo break, make...
exit & restart game options in fail condition mods mutually exclusive
2025-12-07 13:14:38 +03:00
3413f722f7 make volume meter use argon counter (it looks cool) 2025-12-06 23:52:20 +03:00
5 changed files with 36 additions and 10 deletions

View File

@@ -158,6 +158,7 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.ReplayPlaybackControlsExpanded, true);
SetDefault(OsuSetting.GameplayLeaderboard, true);
SetDefault(OsuSetting.AlwaysPlayFirstComboBreak, true);
SetDefault(OsuSetting.AlwaysPlayComboBreak, false);
SetDefault(OsuSetting.FloatingComments, false);
@@ -369,6 +370,7 @@ namespace osu.Game.Configuration
GameplayLeaderboard,
PositionalHitsoundsLevel,
AlwaysPlayFirstComboBreak,
AlwaysPlayComboBreak,
FloatingComments,
HUDVisibilityMode,

View File

@@ -13,6 +13,9 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
protected override LocalisableString Header => GameplaySettingsStrings.AudioHeader;
private SettingsCheckbox alwaysPlayFirst = null!;
private SettingsCheckbox alwaysPlay = null!;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config, OsuConfigManager osuConfig)
{
@@ -26,13 +29,23 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
KeyboardStep = 0.01f,
DisplayAsPercentage = true
},
new SettingsCheckbox
alwaysPlayFirst = new SettingsCheckbox
{
ClassicDefault = false,
LabelText = GameplaySettingsStrings.AlwaysPlayFirstComboBreak,
Current = config.GetBindable<bool>(OsuSetting.AlwaysPlayFirstComboBreak)
},
alwaysPlay = new SettingsCheckbox
{
ClassicDefault = false,
LabelText = "Always play combo break sound",
Current = config.GetBindable<bool>(OsuSetting.AlwaysPlayComboBreak)
}
};
alwaysPlay.Current.BindValueChanged(d =>
{
alwaysPlayFirst.Current.Disabled = d.NewValue;
}, true);
}
}
}

View File

@@ -25,6 +25,7 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Screens.Play.HUD;
using osuTK;
using osuTK.Graphics;
@@ -44,7 +45,7 @@ namespace osu.Game.Overlays.Volume
private readonly Color4 meterColour;
private readonly string name;
private OsuSpriteText text;
private ArgonCounterTextComponent text { get; set; }
private BufferedContainer maxGlow;
private Container selectedGlowContainer;
@@ -199,12 +200,7 @@ namespace osu.Game.Overlays.Volume
Radius = 10,
}
},
maxGlow = (text = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.Numeric.With(size: 0.16f * CircleSize)
}).WithEffect(new GlowEffect
maxGlow = (text = new ArgonCounterTextComponent(Anchor.Centre)).WithEffect(new GlowEffect
{
Colour = Color4.Transparent,
PadExtent = true,
@@ -239,6 +235,8 @@ namespace osu.Game.Overlays.Volume
Bindable.BindValueChanged(volume => { this.TransformTo(nameof(DisplayVolume), volume.NewValue, 400, Easing.OutQuint); }, true);
text.Scale = new Vector2(0.9f);
text.WireframeOpacity.BindTo(new BindableFloat(0.5f));
bgProgress.Progress = 0.75f;
}
@@ -258,9 +256,11 @@ namespace osu.Game.Overlays.Volume
displayVolumeInt = intValue;
text.WireframeTemplate = new string('#', intValue.ToString().Length);
if (displayVolume >= 0.995f)
{
text.Text = "MAX";
text.Text = "100";
maxGlow.EffectColour = meterColour.Opacity(2f);
}
else

View File

@@ -29,6 +29,14 @@ namespace osu.Game.Rulesets.Mods
private Action? triggerFailureDelegate;
// NOTE: when processing serialized replays with both these values enabled, only `Exit`'s value is applied.
// I guess that's reasonable and doesn't break much.
public ModFailCondition()
{
Restart.BindValueChanged(d => { if (d.NewValue) Exit.Value = false; });
Exit.BindValueChanged(d => { if (d.NewValue) Restart.Value = false; });
}
public void ApplyToHealthProcessor(HealthProcessor healthProcessor)
{
triggerFailureDelegate = healthProcessor.TriggerFailure;

View File

@@ -21,6 +21,8 @@ namespace osu.Game.Screens.Play
private Bindable<bool> alwaysPlayFirst;
private Bindable<bool> alwaysPlay;
private double? firstBreakTime;
public ComboEffects(ScoreProcessor processor)
@@ -33,6 +35,7 @@ namespace osu.Game.Screens.Play
{
InternalChild = comboBreakSample = new SkinnableSound(new SampleInfo("Gameplay/combobreak"));
alwaysPlayFirst = config.GetBindable<bool>(OsuSetting.AlwaysPlayFirstComboBreak);
alwaysPlay = config.GetBindable<bool>(OsuSetting.AlwaysPlayComboBreak);
}
protected override void LoadComplete()
@@ -56,7 +59,7 @@ namespace osu.Game.Screens.Play
if (gameplayClock.IsRewinding)
return;
if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlayFirst.Value && firstBreakTime == null)))
if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlayFirst.Value && firstBreakTime == null) || alwaysPlay.Value))
{
firstBreakTime = gameplayClock.CurrentTime;