Fix mania-specific missing cases

This commit is contained in:
Bartłomiej Dach 2020-11-15 15:38:12 +01:00
parent 5d44286d38
commit e5d9cca9de
1 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,9 @@ public override IEnumerable<Mod> ConvertFromLegacyMods(LegacyMods mods)
if (mods.HasFlag(LegacyMods.Key9))
yield return new ManiaModKey9();
if (mods.HasFlag(LegacyMods.KeyCoop))
yield return new ManiaModDualStages();
if (mods.HasFlag(LegacyMods.NoFail))
yield return new ManiaModNoFail();
@ -173,13 +176,22 @@ public override LegacyMods ConvertToLegacyMods(Mod[] mods)
value |= LegacyMods.Key9;
break;
case ManiaModDualStages _:
value |= LegacyMods.KeyCoop;
break;
case ManiaModFadeIn _:
value |= LegacyMods.FadeIn;
value &= ~LegacyMods.Hidden; // due to inheritance
break;
case ManiaModMirror _:
value |= LegacyMods.Mirror;
break;
case ManiaModRandom _:
value |= LegacyMods.Random;
break;
}
}