mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
Tidy up ruleset assignment code
This commit is contained in:
parent
db4e3047dd
commit
9638064741
@ -101,9 +101,6 @@ namespace osu.Game.Tests.Beatmaps
|
||||
{
|
||||
var beatmap = GetBeatmap(name);
|
||||
|
||||
var rulesetInstance = CreateRuleset();
|
||||
beatmap.BeatmapInfo.Ruleset = beatmap.BeatmapInfo.RulesetID == rulesetInstance.RulesetInfo.ID ? rulesetInstance.RulesetInfo : new RulesetInfo();
|
||||
|
||||
var converterResult = new Dictionary<HitObject, IEnumerable<HitObject>>();
|
||||
|
||||
var working = new ConversionWorkingBeatmap(beatmap)
|
||||
@ -115,7 +112,7 @@ namespace osu.Game.Tests.Beatmaps
|
||||
}
|
||||
};
|
||||
|
||||
working.GetPlayableBeatmap(rulesetInstance.RulesetInfo, mods);
|
||||
working.GetPlayableBeatmap(CreateRuleset().RulesetInfo, mods);
|
||||
|
||||
return new ConvertResult
|
||||
{
|
||||
@ -152,8 +149,8 @@ namespace osu.Game.Tests.Beatmaps
|
||||
((LegacyBeatmapDecoder)decoder).ApplyOffsets = false;
|
||||
var beatmap = decoder.Decode(stream);
|
||||
|
||||
// not sure but seems to be required.
|
||||
beatmap.BeatmapInfo.Ruleset = CreateRuleset().RulesetInfo;
|
||||
var rulesetInstance = CreateRuleset();
|
||||
beatmap.BeatmapInfo.Ruleset = beatmap.BeatmapInfo.RulesetID == rulesetInstance.RulesetInfo.ID ? rulesetInstance.RulesetInfo : new RulesetInfo();
|
||||
|
||||
return beatmap;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user