Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't convert TaikoModRandom to/from legacy mods #25823

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class TaikoLegacyModConversionTest : LegacyModConversionTest
new object[] { LegacyMods.HalfTime, new[] { typeof(TaikoModHalfTime) } },
new object[] { LegacyMods.Flashlight, new[] { typeof(TaikoModFlashlight) } },
new object[] { LegacyMods.Autoplay, new[] { typeof(TaikoModAutoplay) } },
new object[] { LegacyMods.Random, new[] { typeof(TaikoModRandom) } },
new object[] { LegacyMods.HardRock | LegacyMods.DoubleTime, new[] { typeof(TaikoModHardRock), typeof(TaikoModDoubleTime) } },
new object[] { LegacyMods.ScoreV2, new[] { typeof(ModScoreV2) } },
};
Expand Down
13 changes: 0 additions & 13 deletions osu.Game.Rulesets.Taiko/TaikoRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,10 @@ public override IEnumerable<Mod> ConvertFromLegacyMods(LegacyMods mods)
if (mods.HasFlagFast(LegacyMods.Relax))
yield return new TaikoModRelax();

if (mods.HasFlagFast(LegacyMods.Random))
yield return new TaikoModRandom();

if (mods.HasFlagFast(LegacyMods.ScoreV2))
yield return new ModScoreV2();
}

public override LegacyMods ConvertToLegacyMods(Mod[] mods)
{
var value = base.ConvertToLegacyMods(mods);

if (mods.OfType<TaikoModRandom>().Any())
value |= LegacyMods.Random;

return value;
}

public override IEnumerable<Mod> GetModsFor(ModType type)
{
switch (type)
Expand Down
Loading