mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
CI fix, fixed nullref and removed abstraction of GetAutoplayMod
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user