mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 21:02:59 +08:00
Merge pull request #10005 from bdach/legacy-mirror-mod-replays
Add support for importing legacy mania replays with mirror mod
This commit is contained in:
commit
d3245dda1c
@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Mania.Tests
|
||||
[TestCase(LegacyMods.Perfect | LegacyMods.SuddenDeath, new[] { typeof(ManiaModPerfect) })]
|
||||
[TestCase(LegacyMods.Perfect | LegacyMods.SuddenDeath | LegacyMods.DoubleTime, new[] { typeof(ManiaModDoubleTime), typeof(ManiaModPerfect) })]
|
||||
[TestCase(LegacyMods.Random | LegacyMods.SuddenDeath, new[] { typeof(ManiaModRandom), typeof(ManiaModSuddenDeath) })]
|
||||
[TestCase(LegacyMods.Flashlight | LegacyMods.Mirror, new[] { typeof(ManiaModFlashlight), typeof(ManiaModMirror) })]
|
||||
public new void Test(LegacyMods legacyMods, Type[] expectedMods) => base.Test(legacyMods, expectedMods);
|
||||
|
||||
protected override Ruleset CreateRuleset() => new ManiaRuleset();
|
||||
|
@ -126,6 +126,9 @@ namespace osu.Game.Rulesets.Mania
|
||||
|
||||
if (mods.HasFlag(LegacyMods.Random))
|
||||
yield return new ManiaModRandom();
|
||||
|
||||
if (mods.HasFlag(LegacyMods.Mirror))
|
||||
yield return new ManiaModMirror();
|
||||
}
|
||||
|
||||
public override LegacyMods ConvertToLegacyMods(Mod[] mods)
|
||||
@ -175,6 +178,10 @@ namespace osu.Game.Rulesets.Mania
|
||||
case ManiaModFadeIn _:
|
||||
value |= LegacyMods.FadeIn;
|
||||
break;
|
||||
|
||||
case ManiaModMirror _:
|
||||
value |= LegacyMods.Mirror;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,5 +38,6 @@ namespace osu.Game.Beatmaps.Legacy
|
||||
Key1 = 1 << 26,
|
||||
Key3 = 1 << 27,
|
||||
Key2 = 1 << 28,
|
||||
Mirror = 1 << 30,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user