1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Fix osu!-specific missing cases

This commit is contained in:
Bartłomiej Dach 2020-11-15 15:40:31 +01:00
parent e5d9cca9de
commit a17990f2ee

View File

@ -107,6 +107,35 @@ namespace osu.Game.Rulesets.Osu
yield return new OsuModTouchDevice();
}
public override LegacyMods ConvertToLegacyMods(Mod[] mods)
{
var value = base.ConvertToLegacyMods(mods);
foreach (var mod in mods)
{
switch (mod)
{
case OsuModAutopilot _:
value |= LegacyMods.Autopilot;
break;
case OsuModSpunOut _:
value |= LegacyMods.SpunOut;
break;
case OsuModTarget _:
value |= LegacyMods.Target;
break;
case OsuModTouchDevice _:
value |= LegacyMods.TouchDevice;
break;
}
}
return value;
}
public override IEnumerable<Mod> GetModsFor(ModType type)
{
switch (type)