mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 19:04: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 string Description => "osu!catch";
|
||||||
|
|
||||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_fruits_o };
|
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 string Description => "osu!mania";
|
||||||
|
|
||||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_mania_o };
|
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 Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_osu_o };
|
||||||
|
|
||||||
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap);
|
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 string Description => "osu!taiko";
|
||||||
|
|
||||||
public override Drawable CreateIcon() => new SpriteIcon { Icon = FontAwesome.fa_osu_taiko_o };
|
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 IEnumerable<Mod> GetModsFor(ModType type) => new Mod[] { };
|
||||||
|
|
||||||
public override Mod GetAutoplayMod() => new ModAutoplay();
|
|
||||||
|
|
||||||
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
public override RulesetContainer CreateRulesetContainerWith(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
@ -26,14 +26,14 @@ namespace osu.Game.Rulesets
|
|||||||
List<Mod> modList = new List<Mod>();
|
List<Mod> modList = new List<Mod>();
|
||||||
|
|
||||||
foreach (ModType type in Enum.GetValues(typeof(ModType)))
|
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;
|
var multiMod = mod as MultiMod;
|
||||||
|
|
||||||
if (multiMod != null)
|
if (multiMod != null)
|
||||||
return multiMod.Mods;
|
return multiMod.Mods;
|
||||||
|
|
||||||
return new Mod[] { mod };
|
return new[] { mod };
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return modList.ToArray();
|
return modList.ToArray();
|
||||||
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets
|
|||||||
return GetAllMods().First(mod => mod.ShortenedName == shortenedName);
|
return GetAllMods().First(mod => mod.ShortenedName == shortenedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract Mod GetAutoplayMod();
|
public Mod GetAutoplayMod() => GetAllMods().First(mod => mod is ModAutoplay);
|
||||||
|
|
||||||
protected Ruleset(RulesetInfo rulesetInfo)
|
protected Ruleset(RulesetInfo rulesetInfo)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user