CI fix, fixed nullref and removed abstraction of GetAutoplayMod

This commit is contained in:
MrTheMake
2017-08-13 20:12:01 +02:00
parent d9c26f98c7
commit 81289db33b
6 changed files with 3 additions and 13 deletions

View File

@ -26,14 +26,14 @@ namespace osu.Game.Rulesets
List<Mod> modList = new List<Mod>();
foreach (ModType type in Enum.GetValues(typeof(ModType)))
modList.AddRange(GetModsFor(type).SelectMany(mod =>
modList.AddRange(GetModsFor(type).Where(mod => mod != null).SelectMany(mod =>
{
var multiMod = mod as MultiMod;
if (multiMod != null)
return multiMod.Mods;
return new Mod[] { mod };
return new[] { mod };
}));
return modList.ToArray();
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets
return GetAllMods().First(mod => mod.ShortenedName == shortenedName);
}
public abstract Mod GetAutoplayMod();
public Mod GetAutoplayMod() => GetAllMods().First(mod => mod is ModAutoplay);
protected Ruleset(RulesetInfo rulesetInfo)
{