mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 09:23:06 +08:00
CI fix, fixed nullref and removed abstraction of GetAutoplayMod
This commit is contained in:
parent
d9c26f98c7
commit
81289db33b
@ -84,8 +84,6 @@ namespace osu.Game.Rulesets.Catch
|
||||
}
|
||||
}
|
||||
|
||||
public override Mod GetAutoplayMod() => new ModAutoplay();
|
||||
|
||||
public override string Description => "osu!catch";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_fruits_o };
|
||||
|
@ -105,8 +105,6 @@ namespace osu.Game.Rulesets.Mania
|
||||
}
|
||||
}
|
||||
|
||||
public override Mod GetAutoplayMod() => new ModAutoplay();
|
||||
|
||||
public override string Description => "osu!mania";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_mania_o };
|
||||
|
@ -105,8 +105,6 @@ namespace osu.Game.Rulesets.Osu
|
||||
}
|
||||
}
|
||||
|
||||
public override Mod GetAutoplayMod() => new OsuModAutoplay();
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_osu_o };
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap);
|
||||
|
@ -84,8 +84,6 @@ namespace osu.Game.Rulesets.Taiko
|
||||
}
|
||||
}
|
||||
|
||||
public override Mod GetAutoplayMod() => new TaikoModAutoplay();
|
||||
|
||||
public override string Description => "osu!taiko";
|
||||
|
||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_taiko_o };
|
||||
|
@ -60,8 +60,6 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public override IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { };
|
||||
|
||||
public override Mod GetAutoplayMod() => new ModAutoplay();
|
||||
|
||||
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user