From c412aa3607451a7b834df448e8e29c15080bdb61 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sat, 21 Dec 2024 18:56:42 +0800 Subject: [PATCH 1/8] Remove No-Fail mod Was a holdover from when sentakki had a fail state --- .../Mods/SentakkiModNoFail.cs | 15 --------------- osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs | 3 +-- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 osu.Game.Rulesets.Sentakki/Mods/SentakkiModNoFail.cs diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNoFail.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNoFail.cs deleted file mode 100644 index 09133e5b4..000000000 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNoFail.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using osu.Game.Rulesets.Mods; - -namespace osu.Game.Rulesets.Sentakki.Mods -{ - public class SentakkiModNoFail : ModNoFail - { - public override Type[] IncompatibleMods => new Type[]{ - typeof(ModRelax), - typeof(ModFailCondition), - typeof(SentakkiModChallenge), - typeof(ModAutoplay) - }; - } -} diff --git a/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs b/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs index 4b57e5dd3..6782f51bf 100644 --- a/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs +++ b/osu.Game.Rulesets.Sentakki/SentakkiRuleset.cs @@ -79,7 +79,6 @@ public override IEnumerable GetModsFor(ModType type) { new SentakkiModRelax(), new MultiMod(new SentakkiModHalfTime(), new SentakkiModDaycore()), - new SentakkiModNoFail(), }; case ModType.DifficultyIncrease: @@ -123,7 +122,7 @@ public override IEnumerable GetModsFor(ModType type) }; default: - return Array.Empty(); + return []; } } From b74eee1f0d54cd7a08e509f6fa2fc0d9ed001b18 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sat, 21 Dec 2024 19:02:32 +0800 Subject: [PATCH 2/8] Remove ScoreMultiplier override for rate adjust mods We inherit the progressive score multiplier that has been implemented in the base mod --- osu.Game.Rulesets.Sentakki/Mods/SentakkiModDaycore.cs | 1 - osu.Game.Rulesets.Sentakki/Mods/SentakkiModDoubleTime.cs | 1 - osu.Game.Rulesets.Sentakki/Mods/SentakkiModHalfTime.cs | 1 - osu.Game.Rulesets.Sentakki/Mods/SentakkiModNightcore.cs | 1 - 4 files changed, 4 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDaycore.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDaycore.cs index 6a17726c9..73cdc88db 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDaycore.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDaycore.cs @@ -4,6 +4,5 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModDaycore : ModDaycore { - public override double ScoreMultiplier => 0.3; } } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDoubleTime.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDoubleTime.cs index 3fdcced11..4194a1db1 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDoubleTime.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModDoubleTime.cs @@ -4,6 +4,5 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModDoubleTime : ModDoubleTime { - public override double ScoreMultiplier => 1.12; } } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHalfTime.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHalfTime.cs index 89d959a79..7b02bdf1e 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHalfTime.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHalfTime.cs @@ -4,6 +4,5 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModHalfTime : ModHalfTime { - public override double ScoreMultiplier => 0.3; } } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNightcore.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNightcore.cs index 679b4038e..662bb2e67 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNightcore.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModNightcore.cs @@ -5,6 +5,5 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModNightcore : ModNightcore { - public override double ScoreMultiplier => 1.12; } } From 9f8ae452682bdbca49301a81a2521ff888f2d5a4 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sat, 21 Dec 2024 19:25:50 +0800 Subject: [PATCH 3/8] Show extended info for Spin mod --- .../Mods/SentakkiModSpinStrings.cs | 3 +++ .../Mods/SentakkiModSpin.cs | 20 ++++++++++++++++--- .../Mods/SentakkiModSpinStrings.resx | 6 +++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModSpinStrings.cs b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModSpinStrings.cs index 63bda7b61..a93533218 100644 --- a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModSpinStrings.cs +++ b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModSpinStrings.cs @@ -15,6 +15,9 @@ public static class SentakkiModSpinStrings public static LocalisableString RevolutionDurationDescription => new TranslatableString(getKey(@"revolution_duration_description"), @"The duration in seconds to complete a revolution."); + public static LocalisableString RevolutionDurationTooltip(int seconds) + => new TranslatableString(getKey(@"entry_speed_tooltip"), @"{0}s", seconds); + private static string getKey(string key) => $"{prefix}:{key}"; } } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs index 56b9fd395..180fdb719 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModSpin.cs @@ -1,7 +1,10 @@ -using osu.Framework.Bindables; +using System; +using osu.Framework.Bindables; using osu.Framework.Graphics.Sprites; using osu.Framework.Localisation; using osu.Game.Configuration; +using osu.Game.Graphics.UserInterface; +using osu.Game.Overlays.Settings; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.UI; @@ -9,10 +12,12 @@ namespace osu.Game.Rulesets.Sentakki.Mods { - public class SentakkiModSpin : Mod, IUpdatableByPlayfield + public partial class SentakkiModSpin : Mod, IUpdatableByPlayfield { public override string Name => "Spin"; public override LocalisableString Description => SentakkiModSpinStrings.ModDescription; + + public override string ExtendedIconInformation => SentakkiModSpinStrings.RevolutionDurationTooltip(seconds: RevolutionDuration.Value).ToString(); public override string Acronym => "S"; public override IconUsage? Icon => FontAwesome.Solid.RedoAlt; @@ -20,7 +25,11 @@ public class SentakkiModSpin : Mod, IUpdatableByPlayfield public override double ScoreMultiplier => 1.00; - [SettingSource(typeof(SentakkiModSpinStrings), nameof(SentakkiModSpinStrings.RevolutionDuration), nameof(SentakkiModSpinStrings.RevolutionDurationDescription))] + [SettingSource( + typeof(SentakkiModSpinStrings), + nameof(SentakkiModSpinStrings.RevolutionDuration), + nameof(SentakkiModSpinStrings.RevolutionDurationDescription), + SettingControlType = typeof(SettingsSlider))] public BindableNumber RevolutionDuration { get; } = new BindableNumber { MinValue = 3, @@ -35,5 +44,10 @@ public void Update(Playfield playfield) if (playfield is SentakkiPlayfield) playfield.Rotation = (float)(playfield.Time.Current / (RevolutionDuration.Value * 1000)) * 360f; } + + public partial class RevolutionDurationSlider : RoundedSliderBar + { + public override LocalisableString TooltipText => SentakkiModSpinStrings.RevolutionDurationTooltip(Current.Value); + } } } diff --git a/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModSpinStrings.resx b/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModSpinStrings.resx index 4cfe6b5ba..09a634360 100644 --- a/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModSpinStrings.resx +++ b/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModSpinStrings.resx @@ -67,4 +67,8 @@ The duration in seconds to complete a revolution. - + + {0}s + This is used to show the exact value, along with the local seconds symbol + + \ No newline at end of file From 297628952e450086da582bc7c341d30a89b2127a Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sat, 21 Dec 2024 19:32:06 +0800 Subject: [PATCH 4/8] Add variable score multipliers for HR --- .../Mods/SentakkiModHardRock.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHardRock.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHardRock.cs index a8448d704..cb85e4b0d 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHardRock.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHardRock.cs @@ -14,7 +14,21 @@ namespace osu.Game.Rulesets.Sentakki.Mods { public class SentakkiModHardRock : ModHardRock, IApplicableToHitObject, IApplicableToDrawableHitObject { - public override double ScoreMultiplier => 1; + public override double ScoreMultiplier + { + get + { + switch (JudgementMode.Value) + { + case SentakkiJudgementMode.Gati: + return 1.2; + case SentakkiJudgementMode.Maji: + return 1.1; + default: + return 1; + } + } + } public override string ExtendedIconInformation => $"{(JudgementMode.Value == SentakkiJudgementMode.Normal ? string.Empty : JudgementMode.Value)}"; From 85926fa216e17ca9f346048059cc60e2e09e20d7 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sat, 21 Dec 2024 21:20:41 +0800 Subject: [PATCH 5/8] Make hidden configurable --- .../Mods/SentakkiModHiddenStrings.cs | 2 ++ .../Mods/SentakkiModHidden.cs | 33 +++++++++++++++++-- .../Mods/SentakkiModHiddenStrings.resx | 8 ++++- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModHiddenStrings.cs b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModHiddenStrings.cs index 96591dc27..cf4a5f3fe 100644 --- a/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModHiddenStrings.cs +++ b/osu.Game.Rulesets.Sentakki/Localisation/Mods/SentakkiModHiddenStrings.cs @@ -7,6 +7,8 @@ public static class SentakkiModHiddenStrings private const string prefix = @"osu.Game.Rulesets.Sentakki.Resources.Localisation.Mods.SentakkiModHiddenStrings"; public static LocalisableString ModDescription => new TranslatableString(getKey(@"mod_description"), @"Notes fade out just before you hit them."); + public static LocalisableString VisibleRadius => new TranslatableString(getKey(@"visible_radius"), @"Visible radius"); + public static LocalisableString VisibleRadiusDescription => new TranslatableString(getKey(@"visible_radius_description"), @"The visible radius of laned notes."); private static string getKey(string key) => $"{prefix}:{key}"; } diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index be7de839c..b52270a82 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs @@ -1,6 +1,7 @@ using System; using System.Runtime.InteropServices; using osu.Framework.Allocation; +using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; @@ -9,7 +10,10 @@ using osu.Framework.Graphics.Shaders; using osu.Framework.Graphics.Shaders.Types; using osu.Framework.Localisation; +using osu.Game.Configuration; using osu.Game.Graphics.OpenGL.Vertices; +using osu.Game.Graphics.UserInterface; +using osu.Game.Overlays.Settings; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; @@ -26,7 +30,24 @@ public partial class SentakkiModHidden : ModHidden, IApplicableToDrawableRuleset { public override LocalisableString Description => SentakkiModHiddenStrings.ModDescription; - public override double ScoreMultiplier => 1.06; + public override string ExtendedIconInformation => VisibleRadius.IsDefault ? string.Empty : $"{VisibleRadius.Value:P0}"; + + public override double ScoreMultiplier => 1 + MathF.Pow(1 - VisibleRadius.Value, 2) * 0.2; + + [SettingSource( + typeof(SentakkiModHiddenStrings), + nameof(SentakkiModHiddenStrings.VisibleRadius), + nameof(SentakkiModHiddenStrings.VisibleRadiusDescription), + SettingControlType = typeof(SettingsSlider))] + public BindableFloat VisibleRadius { get; } = new BindableFloat + { + MinValue = 0f, + MaxValue = 1f, + Default = 0.6f, + Value = 0.6f, + Precision = 0.05f + }; + public void ApplyToDrawableRuleset(DrawableRuleset drawableRuleset) { @@ -39,7 +60,7 @@ public void ApplyToDrawableRuleset(DrawableRuleset drawableRu lanedHitObjectArea.Remove(lanedNoteProxyContainer, false); lanedHitObjectArea.Add(new PlayfieldMaskingContainer(lanedNoteProxyContainer) { - CoverageRadius = 0.6f + CoverageRadius = VisibleRadius.Value }); lanedPlayfield.HitObjectLineRenderer.Hide(); @@ -76,6 +97,14 @@ protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, } } + private partial class PercentageRoundedSliderBar : RoundedSliderBar + { + public PercentageRoundedSliderBar() + { + DisplayAsPercentage = true; + } + } + private partial class PlayfieldMaskingContainer : CircularContainer { private readonly PlayfieldMask cover; diff --git a/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModHiddenStrings.resx b/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModHiddenStrings.resx index 3ab0dc762..b2584b8a5 100644 --- a/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModHiddenStrings.resx +++ b/osu.Game.Rulesets.Sentakki/Resources/Localisation/Mods/SentakkiModHiddenStrings.resx @@ -61,4 +61,10 @@ Notes fade out just before you hit them. - + + Visible radius + + + The visible radius of laned notes. + + \ No newline at end of file From f9e107f91c2b9d4fa0eceaf5863a208f05c05615 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Sat, 21 Dec 2024 14:31:04 +0000 Subject: [PATCH 6/8] [CodeFactor] Apply fixes --- osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index b52270a82..62942b0eb 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs @@ -32,7 +32,7 @@ public partial class SentakkiModHidden : ModHidden, IApplicableToDrawableRuleset public override string ExtendedIconInformation => VisibleRadius.IsDefault ? string.Empty : $"{VisibleRadius.Value:P0}"; - public override double ScoreMultiplier => 1 + MathF.Pow(1 - VisibleRadius.Value, 2) * 0.2; + public override double ScoreMultiplier => 1 + (MathF.Pow(1 - VisibleRadius.Value, 2) * 0.2); [SettingSource( typeof(SentakkiModHiddenStrings), From c1a0898e57adde3cd83503850b779cc26a431523 Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sun, 19 Jan 2025 19:22:55 +0100 Subject: [PATCH 7/8] Take into account the practical visible area of laned notes --- osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs | 9 ++++++++- .../Objects/Drawables/Pieces/NoteRingPiece.cs | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index 62942b0eb..9d3c1b1d0 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs @@ -20,6 +20,7 @@ using osu.Game.Rulesets.Sentakki.Localisation.Mods; using osu.Game.Rulesets.Sentakki.Objects; using osu.Game.Rulesets.Sentakki.Objects.Drawables; +using osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces; using osu.Game.Rulesets.Sentakki.UI; using osu.Game.Rulesets.UI; using osuTK; @@ -57,10 +58,16 @@ public void ApplyToDrawableRuleset(DrawableRuleset drawableRu var lanedHitObjectArea = lanedPlayfield.LanedHitObjectArea; var lanedNoteProxyContainer = lanedHitObjectArea.Child; + float noteVisiblePoint = SentakkiPlayfield.NOTESTARTDISTANCE - NoteRingPiece.DRAWABLE_SIZE / 2f; + float totalVisibleDistance = SentakkiPlayfield.INTERSECTDISTANCE; + + float visibilityStartPoint = noteVisiblePoint / totalVisibleDistance; + float visibleRatio = 1 - visibilityStartPoint; + lanedHitObjectArea.Remove(lanedNoteProxyContainer, false); lanedHitObjectArea.Add(new PlayfieldMaskingContainer(lanedNoteProxyContainer) { - CoverageRadius = VisibleRadius.Value + CoverageRadius = visibilityStartPoint + visibleRatio * VisibleRadius.Value }); lanedPlayfield.HitObjectLineRenderer.Hide(); diff --git a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs index ac88c07fe..363739bbc 100644 --- a/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs +++ b/osu.Game.Rulesets.Sentakki/Objects/Drawables/Pieces/NoteRingPiece.cs @@ -9,11 +9,11 @@ namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces public partial class NoteRingPiece : CompositeDrawable { private const float base_circle_size = 75; - private const float drawable_size = base_circle_size + 30; // 30 units for shadow + public const float DRAWABLE_SIZE = base_circle_size + 30; // 30 units for shadow public NoteRingPiece(bool hex = false) { - Padding = new MarginPadding(-drawable_size / 2); + Padding = new MarginPadding(-DRAWABLE_SIZE / 2); RelativeSizeAxes = Axes.Both; Anchor = Anchor.Centre; Origin = Anchor.Centre; From d57b3ddff7355394d17008add866c1e0328edee9 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Sun, 19 Jan 2025 19:03:35 +0000 Subject: [PATCH 8/8] [CodeFactor] Apply fixes --- osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index 9d3c1b1d0..d7160154c 100644 --- a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs +++ b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs @@ -58,7 +58,7 @@ public void ApplyToDrawableRuleset(DrawableRuleset drawableRu var lanedHitObjectArea = lanedPlayfield.LanedHitObjectArea; var lanedNoteProxyContainer = lanedHitObjectArea.Child; - float noteVisiblePoint = SentakkiPlayfield.NOTESTARTDISTANCE - NoteRingPiece.DRAWABLE_SIZE / 2f; + float noteVisiblePoint = SentakkiPlayfield.NOTESTARTDISTANCE - (NoteRingPiece.DRAWABLE_SIZE / 2f); float totalVisibleDistance = SentakkiPlayfield.INTERSECTDISTANCE; float visibilityStartPoint = noteVisiblePoint / totalVisibleDistance; @@ -67,7 +67,7 @@ public void ApplyToDrawableRuleset(DrawableRuleset drawableRu lanedHitObjectArea.Remove(lanedNoteProxyContainer, false); lanedHitObjectArea.Add(new PlayfieldMaskingContainer(lanedNoteProxyContainer) { - CoverageRadius = visibilityStartPoint + visibleRatio * VisibleRadius.Value + CoverageRadius = visibilityStartPoint + (visibleRatio * VisibleRadius.Value) }); lanedPlayfield.HitObjectLineRenderer.Hide();