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/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/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/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)}"; diff --git a/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs b/osu.Game.Rulesets.Sentakki/Mods/SentakkiModHidden.cs index be7de839c..d7160154c 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,13 +10,17 @@ 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; 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; @@ -26,7 +31,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) { @@ -36,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 = 0.6f + CoverageRadius = visibilityStartPoint + (visibleRatio * VisibleRadius.Value) }); lanedPlayfield.HitObjectLineRenderer.Hide(); @@ -76,6 +104,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/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; } } 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/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/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; 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 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 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 []; } }