Allow testing mod combinations in ModTestScenes

This commit is contained in:
Bartłomiej Dach 2020-08-11 21:55:20 +02:00
parent b78ccf8a34
commit 8fe5775ecb
1 changed files with 13 additions and 4 deletions

View File

@ -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 };
}
}
}
}