mirror of https://github.com/ppy/osu
Allow testing mod combinations in ModTestScenes
This commit is contained in:
parent
b78ccf8a34
commit
8fe5775ecb
|
@ -40,8 +40,8 @@ protected sealed override TestPlayer CreatePlayer(Ruleset ruleset)
|
|||
{
|
||||
var mods = new List<Mod>(SelectedMods.Value);
|
||||
|
||||
if (currentTestData.Mod != null)
|
||||
mods.Add(currentTestData.Mod);
|
||||
if (currentTestData.Mods != null)
|
||||
mods.AddRange(currentTestData.Mods);
|
||||
if (currentTestData.Autoplay)
|
||||
mods.Add(ruleset.GetAutoplayMod());
|
||||
|
||||
|
@ -85,9 +85,18 @@ protected class ModTestData
|
|||
public Func<bool> PassCondition;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Mod"/> this test case tests.
|
||||
/// The <see cref="Mod"/>s this test case tests.
|
||||
/// </summary>
|
||||
public Mod Mod;
|
||||
public IReadOnlyList<Mod> Mods;
|
||||
|
||||
/// <summary>
|
||||
/// Convenience property for setting <see cref="Mods"/> if only
|
||||
/// a single mod is to be tested.
|
||||
/// </summary>
|
||||
public Mod Mod
|
||||
{
|
||||
set => Mods = new[] { value };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue