mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Various updates to ruleset and primary key usages to move closer to realm support
This commit is contained in:
@ -226,8 +226,8 @@ namespace osu.Game.Screens.Play
|
||||
// ensure the score is in a consistent state with the current player.
|
||||
Score.ScoreInfo.BeatmapInfo = Beatmap.Value.BeatmapInfo;
|
||||
Score.ScoreInfo.Ruleset = ruleset.RulesetInfo;
|
||||
if (ruleset.RulesetInfo.ID != null)
|
||||
Score.ScoreInfo.RulesetID = ruleset.RulesetInfo.ID.Value;
|
||||
if (ruleset.RulesetInfo.OnlineID >= 0)
|
||||
Score.ScoreInfo.RulesetID = ruleset.RulesetInfo.OnlineID;
|
||||
Score.ScoreInfo.Mods = gameplayMods;
|
||||
|
||||
dependencies.CacheAs(GameplayState = new GameplayState(playableBeatmap, ruleset, gameplayMods, Score));
|
||||
@ -488,6 +488,9 @@ namespace osu.Game.Screens.Play
|
||||
var rulesetInfo = Ruleset.Value ?? Beatmap.Value.BeatmapInfo.Ruleset;
|
||||
ruleset = rulesetInfo.CreateInstance();
|
||||
|
||||
if (ruleset == null)
|
||||
throw new RulesetLoadException("Instantiation failure");
|
||||
|
||||
try
|
||||
{
|
||||
playable = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, gameplayMods);
|
||||
|
Reference in New Issue
Block a user