Remove unnecessary ctor arguments

This commit is contained in:
Dan Balasescu 2022-03-15 12:34:58 +09:00
parent faf145742f
commit daac933498
12 changed files with 16 additions and 19 deletions

View File

@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Catch
{
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableCatchRuleset(this, beatmap, mods);
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this);
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor();
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new CatchBeatmapConverter(beatmap, this);

View File

@ -7,8 +7,8 @@ namespace osu.Game.Rulesets.Catch.Scoring
{
public class CatchScoreProcessor : ScoreProcessor
{
public CatchScoreProcessor(CatchRuleset ruleset)
: base(ruleset)
public CatchScoreProcessor()
: base(new CatchRuleset())
{
}

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Mania
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableManiaRuleset(this, beatmap, mods);
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(this);
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new ManiaHealthProcessor(drainStartTime, 0.5);

View File

@ -7,8 +7,8 @@ namespace osu.Game.Rulesets.Mania.Scoring
{
internal class ManiaScoreProcessor : ScoreProcessor
{
public ManiaScoreProcessor(ManiaRuleset ruleset)
: base(ruleset)
public ManiaScoreProcessor()
: base(new ManiaRuleset())
{
}

View File

@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Osu
{
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableOsuRuleset(this, beatmap, mods);
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this);
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor();
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new OsuBeatmapConverter(beatmap, this);

View File

@ -11,8 +11,8 @@ namespace osu.Game.Rulesets.Osu.Scoring
{
public class OsuScoreProcessor : ScoreProcessor
{
public OsuScoreProcessor(OsuRuleset ruleset)
: base(ruleset)
public OsuScoreProcessor()
: base(new OsuRuleset())
{
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
[SetUp]
public void SetUp()
{
scoreProcessor = new TaikoScoreProcessor(new TaikoRuleset());
scoreProcessor = new TaikoScoreProcessor();
}
[Test]

View File

@ -7,8 +7,8 @@ namespace osu.Game.Rulesets.Taiko.Scoring
{
internal class TaikoScoreProcessor : ScoreProcessor
{
public TaikoScoreProcessor(TaikoRuleset ruleset)
: base(ruleset)
public TaikoScoreProcessor()
: base(new TaikoRuleset())
{
}

View File

@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Taiko
{
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableTaikoRuleset(this, beatmap, mods);
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this);
public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor();
public override HealthProcessor CreateHealthProcessor(double drainStartTime) => new TaikoHealthProcessor();

View File

@ -8,7 +8,6 @@ using osu.Framework.Testing;
using osu.Framework.Timing;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Screens.OnlinePlay.Multiplayer.Spectate;
using osu.Game.Screens.Play.HUD;
@ -44,7 +43,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
Beatmap.Value = CreateWorkingBeatmap(Ruleset.Value);
var playable = Beatmap.Value.GetPlayableBeatmap(Ruleset.Value);
var scoreProcessor = new OsuScoreProcessor(new OsuRuleset());
var scoreProcessor = new OsuScoreProcessor();
scoreProcessor.ApplyBeatmap(playable);
LoadComponentAsync(leaderboard = new MultiSpectatorLeaderboard(Ruleset.Value, scoreProcessor, clocks.Keys.Select(id => new MultiplayerRoomUser(id)).ToArray())

View File

@ -16,7 +16,6 @@ using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Spectator;
using osu.Game.Replays.Legacy;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
@ -65,7 +64,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Children = new Drawable[]
{
scoreProcessor = new OsuScoreProcessor(new OsuRuleset()),
scoreProcessor = new OsuScoreProcessor(),
};
scoreProcessor.ApplyBeatmap(playableBeatmap);

View File

@ -12,7 +12,6 @@ using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.MatchTypes.TeamVersus;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Screens.OnlinePlay.Multiplayer;
using osu.Game.Screens.Play.HUD;
@ -76,7 +75,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Children = new Drawable[]
{
scoreProcessor = new OsuScoreProcessor(new OsuRuleset()),
scoreProcessor = new OsuScoreProcessor(),
};
scoreProcessor.ApplyBeatmap(playableBeatmap);