Skip to content

Commit

Permalink
Should always able to get the karaoke ruleset.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed May 9, 2023
1 parent 14dab6c commit 7679d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/Extensions/OsuGameExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ namespace osu.Game.Rulesets.Karaoke.Extensions;
/// </summary>
public static class OsuGameExtensions
{
public static KaraokeRuleset? GetRuleset(this DependencyContainer dependencies)
public static KaraokeRuleset GetRuleset(this DependencyContainer dependencies)
{
var rulesets = dependencies.Get<RulesetStore>().AvailableRulesets.Select(info => info.CreateInstance());
return rulesets.FirstOrDefault(r => r is KaraokeRuleset) as KaraokeRuleset;
return rulesets.OfType<KaraokeRuleset>().First();
}

private static Container? getBasePlacementContainer(this OsuGame game)
Expand Down

0 comments on commit 7679d74

Please sign in to comment.