1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 10:03:05 +08:00

Use IsLegacyRuleset extension method

This commit is contained in:
Andrei Zavatski 2023-01-12 23:21:33 +03:00
parent 1dae1149cb
commit a7ac31fa34
2 changed files with 4 additions and 5 deletions

View File

@ -6,6 +6,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Extensions;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets;
@ -30,8 +31,7 @@ namespace osu.Game.Overlays.BeatmapListing
foreach (var r in rulesets.AvailableRulesets)
{
// Don't display non-legacy rulesets
int id = r.OnlineID;
if (id < 0 || id > 3)
if (!r.IsLegacyRuleset())
continue;
AddItem(r);

View File

@ -6,6 +6,7 @@
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Allocation;
using osu.Framework.Logging;
using osu.Game.Extensions;
namespace osu.Game.Rulesets
{
@ -28,9 +29,7 @@ namespace osu.Game.Rulesets
{
foreach (var ruleset in Rulesets.AvailableRulesets)
{
int id = ruleset.OnlineID;
if ((id < 0 || id > 3) && legacyOnly)
if (!ruleset.IsLegacyRuleset() && legacyOnly)
continue;
try