From 316e8a5ac1c1ffedbfa84e0d58a21f45394fd51c Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 19 Mar 2023 05:46:26 +0100 Subject: [PATCH] framework upgrades depends on https://github.com/karaoke-dev/osu-framework-font/pull/321 --- .../Edit/Setup/KaraokeSetupSection.cs | 4 ++++ .../Scoring/KaraokeLyricHitWindows.cs | 1 + .../Settings/TimeTags/RecordTimeTagActionReceiver.cs | 2 +- .../Skinning/Tools/SkinConverterTool.cs | 8 +++----- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/Setup/KaraokeSetupSection.cs b/osu.Game.Rulesets.Karaoke/Edit/Setup/KaraokeSetupSection.cs index fd88f7f3e..d3f78c102 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Setup/KaraokeSetupSection.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Setup/KaraokeSetupSection.cs @@ -20,9 +20,13 @@ public partial class KaraokeSetupSection : RulesetSetupSection private LabelledSwitchButton scorable; private LabelledSingerList singerList; + [Cached(typeof(IKaraokeBeatmapResourcesProvider))] + private KaraokeBeatmapResourcesProvider karaokeBeatmapResourcesProvider; + public KaraokeSetupSection() : base(new KaraokeRuleset().RulesetInfo) { + AddInternal(karaokeBeatmapResourcesProvider = new KaraokeBeatmapResourcesProvider()); } [BackgroundDependencyLoader] diff --git a/osu.Game.Rulesets.Karaoke/Scoring/KaraokeLyricHitWindows.cs b/osu.Game.Rulesets.Karaoke/Scoring/KaraokeLyricHitWindows.cs index c8c063359..696442259 100644 --- a/osu.Game.Rulesets.Karaoke/Scoring/KaraokeLyricHitWindows.cs +++ b/osu.Game.Rulesets.Karaoke/Scoring/KaraokeLyricHitWindows.cs @@ -12,6 +12,7 @@ public class KaraokeLyricHitWindows : KaraokeHitWindows private static readonly DifficultyRange[] lyric_ranges = { new(DEFAULT_HIT_RESULT, 40, 20, 10), + new(HitResult.Miss, 400, 200, 100), }; public override bool IsHitResultAllowed(HitResult result) => diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/TimeTags/RecordTimeTagActionReceiver.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/TimeTags/RecordTimeTagActionReceiver.cs index b27e5d65c..45750bfec 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/TimeTags/RecordTimeTagActionReceiver.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Settings/TimeTags/RecordTimeTagActionReceiver.cs @@ -34,7 +34,7 @@ public bool OnPressed(KeyBindingPressEvent e) { var caretPosition = lyricCaretState.CaretPosition; if (caretPosition is not TimeTagCaretPosition timeTagCaretPosition) - throw new NotSupportedException(nameof(caretPosition)); + throw new NotSupportedException(caretPosition?.GetType().Name ?? "(null)"); var currentTimeTag = timeTagCaretPosition.TimeTag; diff --git a/osu.Game.Rulesets.Karaoke/Skinning/Tools/SkinConverterTool.cs b/osu.Game.Rulesets.Karaoke/Skinning/Tools/SkinConverterTool.cs index beebbbcba..461197cce 100644 --- a/osu.Game.Rulesets.Karaoke/Skinning/Tools/SkinConverterTool.cs +++ b/osu.Game.Rulesets.Karaoke/Skinning/Tools/SkinConverterTool.cs @@ -37,14 +37,11 @@ public static ICustomizedShader[] ConvertRightSideShader(ShaderManager? shaderMa private static void attachShaders(ShaderManager shaderManager, IEnumerable shaders) { + // TODO: StepShader should not inherit from ICustomizedShader foreach (var shader in shaders) { switch (shader) { - case InternalShader internalShader: - shaderManager.AttachShader(internalShader); - break; - case StepShader stepShader: attachShaders(shaderManager, stepShader.StepShaders.ToArray()); break; @@ -53,7 +50,8 @@ private static void attachShaders(ShaderManager shaderManager, IEnumerable