1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Prevent incorrect usages by hard-typing ctor type

This commit is contained in:
Dan Balasescu 2022-03-15 09:11:57 +09:00
parent 028750936c
commit 59d57a44d4
7 changed files with 10 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -8,6 +8,7 @@ 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;
@ -43,7 +44,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
Beatmap.Value = CreateWorkingBeatmap(Ruleset.Value);
var playable = Beatmap.Value.GetPlayableBeatmap(Ruleset.Value);
var scoreProcessor = new OsuScoreProcessor(Ruleset.Value.CreateInstance());
var scoreProcessor = new OsuScoreProcessor(new OsuRuleset());
scoreProcessor.ApplyBeatmap(playable);
LoadComponentAsync(leaderboard = new MultiSpectatorLeaderboard(Ruleset.Value, scoreProcessor, clocks.Keys.Select(id => new MultiplayerRoomUser(id)).ToArray())

View File

@ -16,6 +16,7 @@ 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;
@ -64,7 +65,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Children = new Drawable[]
{
scoreProcessor = new OsuScoreProcessor(Ruleset.Value.CreateInstance()),
scoreProcessor = new OsuScoreProcessor(new OsuRuleset()),
};
scoreProcessor.ApplyBeatmap(playableBeatmap);

View File

@ -12,6 +12,7 @@ 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;
@ -75,7 +76,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Children = new Drawable[]
{
scoreProcessor = new OsuScoreProcessor(Ruleset.Value.CreateInstance()),
scoreProcessor = new OsuScoreProcessor(new OsuRuleset()),
};
scoreProcessor.ApplyBeatmap(playableBeatmap);