Ensure `Score` created by `GameplayState` has a valid ruleset

This commit is contained in:
Dean Herbert 2022-01-10 13:08:57 +09:00
parent 82259ee072
commit 5dd0bb1218
1 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,13 @@ public GameplayState(IBeatmap beatmap, Ruleset ruleset, IReadOnlyList<Mod>? mods
{
Beatmap = beatmap;
Ruleset = ruleset;
Score = score ?? new Score();
Score = score ?? new Score
{
ScoreInfo =
{
Ruleset = ruleset.RulesetInfo
}
};
Mods = mods ?? ArraySegment<Mod>.Empty;
}