From 842a858a98a03868cee73ec1fe4b7cdeb2484c0c Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sun, 3 Nov 2024 01:40:22 +0100 Subject: [PATCH] Use whistle sample for EX state --- .../Converter/SentakkiBeatmapConverter.HitCircle.cs | 4 +++- .../Converter/SentakkiBeatmapConverter.Slider.cs | 10 +++++++--- .../Beatmaps/Converter/SentakkiBeatmapConverter.cs | 8 +++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.HitCircle.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.HitCircle.cs index b06e9b1a7..d255e5cd8 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.HitCircle.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.HitCircle.cs @@ -11,13 +11,15 @@ public partial class SentakkiBeatmapConverter private Tap convertHitCircle(HitObject original, int lane, double startTime) { bool isBreak = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_FINISH); + bool isSoft = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE); Tap result = new Tap { Lane = lane, Samples = original.Samples, StartTime = startTime, - Break = isBreak + Break = isBreak, + Ex = isSoft }; return result; diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.Slider.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.Slider.cs index 5d6c02604..0a9ca0e04 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.Slider.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.Slider.cs @@ -23,8 +23,6 @@ private SentakkiHitObject convertSlider(HitObject original, int lane, bool force bool isSuitableSlider = !isLazySlider(original); - bool isBreak = slider.NodeSamples[0].Any(s => s.Name == HitSampleInfo.HIT_FINISH); - if (isSuitableSlider && !forceHoldNote) { var slide = tryConvertToSlide(original, lane, allowFans); @@ -33,6 +31,9 @@ private SentakkiHitObject convertSlider(HitObject original, int lane, bool force return slide.Value.Item1; } + bool isBreak = slider.NodeSamples[0].Any(s => s.Name == HitSampleInfo.HIT_FINISH); + bool isSoft = slider.NodeSamples[0].Any(s => s.Name == HitSampleInfo.HIT_WHISTLE); + var hold = new Hold { Lane = lane, @@ -40,6 +41,7 @@ private SentakkiHitObject convertSlider(HitObject original, int lane, bool force StartTime = original.StartTime, Duration = duration, NodeSamples = slider.NodeSamples, + Ex = isSoft, }; return hold; } @@ -55,6 +57,7 @@ private SentakkiHitObject convertSlider(HitObject original, int lane, bool force bool tailBreak = nodeSamples.Last().Any(s => s.Name == HitSampleInfo.HIT_FINISH); bool headBreak = nodeSamples.First().Any(s => s.Name == HitSampleInfo.HIT_FINISH); + bool isSoft = original.Samples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE); int endOffset = selectedPath.Sum(p => p.EndOffset); @@ -75,7 +78,8 @@ private SentakkiHitObject convertSlider(HitObject original, int lane, bool force Lane = lane.NormalizePath(), StartTime = original.StartTime, Samples = nodeSamples.FirstOrDefault(), - Break = headBreak + Break = headBreak, + Ex = isSoft }; return (slide, end); diff --git a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.cs b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.cs index 8cfe439ee..79c5afed1 100644 --- a/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.cs +++ b/osu.Game.Rulesets.Sentakki/Beatmaps/Converter/SentakkiBeatmapConverter.cs @@ -122,11 +122,17 @@ protected override IEnumerable ConvertHitObject(HitObject ori if (targetTime >= fanStartTime) break; - if (tryGetLaneForTwinNote(original.StartTime, out int twinLane)) + bool isBreak = samples.Any(h => h.Name == HitSampleInfo.HIT_FINISH); + bool isSoft = samples.Any(h => h.Name == HitSampleInfo.HIT_WHISTLE); + + if (tryGetLaneForTwinNote(targetTime, out int twinLane)) { var sho = (SentakkiLanedHitObject)convertHitCircle(original, twinLane, targetTime); sho.Break = isBreak; sho.Samples = samples; + sho.Ex = isSoft; + + yield return sho; }; }