From 299b27fea656c741becea9a8c8e43ddb07b0c594 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Thu, 1 Sep 2022 00:41:55 +0800 Subject: [PATCH 1/2] Update package to the latest and fix the api broken. --- .../Editor/TestSceneSingerScreen.cs | 2 +- osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs | 5 +++-- osu.Game.Rulesets.Karaoke/Mods/KaraokeModAutoplayBySinger.cs | 3 ++- osu.Game.Rulesets.Karaoke/Mods/KaraokeModDisableNote.cs | 3 ++- osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs | 3 ++- osu.Game.Rulesets.Karaoke/Mods/KaraokeModSnow.cs | 3 ++- osu.Game.Rulesets.Karaoke/Mods/KaraokeModWindowsUpdate.cs | 3 ++- osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditor.cs | 2 +- osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 4 ++-- 9 files changed, 17 insertions(+), 11 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneSingerScreen.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneSingerScreen.cs index c9e6f33b7..9dab1da24 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneSingerScreen.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/TestSceneSingerScreen.cs @@ -85,7 +85,7 @@ private void load() { Value = Beatmap.Value.BeatmapInfo.BeatDivisor }; - var editorClock = new EditorClock(Beatmap.Value.Beatmap, beatDivisor) { IsCoupled = false }; + var editorClock = new EditorClock(Beatmap.Value.Beatmap, beatDivisor); Dependencies.CacheAs(editorClock); Dependencies.Cache(beatDivisor); Dependencies.CacheAs(dialogOverlay); diff --git a/osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs b/osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs index 16be786b6..ef4415da0 100644 --- a/osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs +++ b/osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs @@ -13,6 +13,7 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input.Bindings; using osu.Framework.IO.Stores; +using osu.Framework.Localisation; using osu.Framework.Testing; using osu.Game.Beatmaps; using osu.Game.Configuration; @@ -126,7 +127,7 @@ public override IEnumerable GetDefaultKeyBindings(int variant = 0) = _ => Array.Empty() }; - public override string GetVariantName(int variant) + public override LocalisableString GetVariantName(int variant) => variant switch { GAMEPLAY_INPUT_VARIANT => "Gameplay", @@ -208,7 +209,7 @@ protected override IEnumerable GetValidHitResults() }; } - public override string GetDisplayNameForHitResult(HitResult result) + public override LocalisableString GetDisplayNameForHitResult(HitResult result) { return result switch { diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModAutoplayBySinger.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModAutoplayBySinger.cs index a7bdf9994..bedec1b7e 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModAutoplayBySinger.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModAutoplayBySinger.cs @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Beatmaps; using osu.Game.Extensions; using osu.Game.Rulesets.Karaoke.Graphics.Sprites; @@ -21,7 +22,7 @@ public class KaraokeModAutoplayBySinger : KaraokeModAutoplay { public override string Name => "Autoplay by singer"; public override string Acronym => "ABS"; - public override string Description => "Autoplay mode but replay's record is by singer's voice."; + public override LocalisableString Description => "Autoplay mode but replay's record is by singer's voice."; public override IconUsage? Icon => KaraokeIcon.ModAutoPlayBySinger; diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModDisableNote.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModDisableNote.cs index 69dfa0918..e6daa184c 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModDisableNote.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModDisableNote.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Rulesets.Karaoke.Graphics.Sprites; using osu.Game.Rulesets.Karaoke.Objects; using osu.Game.Rulesets.Mods; @@ -13,7 +14,7 @@ public class KaraokeModDisableNote : Mod, IApplicableToHitObject { public override string Name => "Disable note"; - public override string Description => "Disable note"; + public override LocalisableString Description => "Disable note"; public override string Acronym => "DN"; public override double ScoreMultiplier => 0; public override IconUsage? Icon => KaraokeIcon.ModDisableNote; diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs index 8f5efb231..5f88c33c6 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModHiddenNote.cs @@ -4,6 +4,7 @@ using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Rulesets.Karaoke.Graphics.Sprites; using osu.Game.Rulesets.Karaoke.Objects; using osu.Game.Rulesets.Karaoke.Objects.Drawables; @@ -14,7 +15,7 @@ namespace osu.Game.Rulesets.Karaoke.Mods { public class KaraokeModHiddenNote : ModHidden { - public override string Description => @"Notes fade out before you sing them!"; + public override LocalisableString Description => @"Notes fade out before you sing them!"; public override double ScoreMultiplier => 1.06; public override Type[] IncompatibleMods => new[] { typeof(ModFlashlight) }; public override IconUsage? Icon => KaraokeIcon.ModHiddenNote; diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModSnow.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModSnow.cs index b2af91e61..7cfb849cd 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModSnow.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModSnow.cs @@ -6,6 +6,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Framework.Timing; using osu.Framework.Utils; using osu.Game.Rulesets.Mods; @@ -19,7 +20,7 @@ public class KaraokeModSnow : Mod, IApplicableToHUD { public override string Name => "Snow"; - public override string Description => "Display some snow"; + public override LocalisableString Description => "Display some snow"; public override string Acronym => "SW"; public override double ScoreMultiplier => 1.0f; public override IconUsage? Icon => FontAwesome.Regular.Snowflake; diff --git a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModWindowsUpdate.cs b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModWindowsUpdate.cs index ad68c1e67..dc6306d1f 100644 --- a/osu.Game.Rulesets.Karaoke/Mods/KaraokeModWindowsUpdate.cs +++ b/osu.Game.Rulesets.Karaoke/Mods/KaraokeModWindowsUpdate.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; +using osu.Framework.Localisation; using osu.Game.Graphics.Sprites; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Mods; @@ -23,7 +24,7 @@ public class KaraokeModWindowsUpdate : ModSuddenDeath, IApplicableToHUD public override string Name => "Windows update"; public override string Acronym => "WD"; public override IconUsage? Icon => FontAwesome.Brands.Windows; - public override string Description => "Once you missed, windows will upppppdate your osu!"; + public override LocalisableString Description => "Once you missed, windows will upppppdate your osu!"; private HUDOverlay overlay = null!; private WindowsUpdateContainer? windowsUpdateContainer; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditor.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditor.cs index ea3b4c9e4..ff98db41c 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditor.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/GenericEditor.cs @@ -57,7 +57,7 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl private void load(OsuColour colours, EditorBeatmap editorBeatmap, BindableBeatDivisor beatDivisor) { // todo: should re-inject editor clock because it will let track cannot change time because it's in another screen. - var clock = new EditorClock(editorBeatmap, beatDivisor) { IsCoupled = false }; + var clock = new EditorClock(editorBeatmap, beatDivisor); var loadableBeatmap = Beatmap.Value; clock.ChangeSource(loadableBeatmap.Track); diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index de5cc73d0..68d9096f5 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -12,13 +12,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + From fe4b5750fed35b195a5861ddda9dc32e4612c596 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Thu, 1 Sep 2022 00:42:45 +0800 Subject: [PATCH 2/2] Upgrade remaining package to the latest. --- .../osu.Game.Rulesets.Karaoke.Tests.csproj | 2 +- osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/osu.Game.Rulesets.Karaoke.Tests.csproj b/osu.Game.Rulesets.Karaoke.Tests/osu.Game.Rulesets.Karaoke.Tests.csproj index 2d55d75d6..0355ffe34 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/osu.Game.Rulesets.Karaoke.Tests.csproj +++ b/osu.Game.Rulesets.Karaoke.Tests/osu.Game.Rulesets.Karaoke.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index 68d9096f5..9fae3e8f5 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -11,7 +11,7 @@ - +