mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 09:23:06 +08:00
Add back settable RulesetID
for now
This commit is contained in:
parent
2a980cc474
commit
dcd69e852e
@ -140,8 +140,21 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
#region Compatibility properties
|
||||
|
||||
private int rulesetID;
|
||||
|
||||
[Ignored]
|
||||
public int RulesetID => Ruleset.OnlineID;
|
||||
public int RulesetID
|
||||
{
|
||||
// ReSharper disable once ConstantConditionalAccessQualifier
|
||||
get => Ruleset?.OnlineID ?? rulesetID;
|
||||
set
|
||||
{
|
||||
if (Ruleset != null)
|
||||
throw new InvalidOperationException($"Cannot set a {nameof(RulesetID)} when {nameof(Ruleset)} is non-null");
|
||||
|
||||
rulesetID = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Ignored]
|
||||
public Guid BeatmapSetInfoID => BeatmapSet?.ID ?? Guid.Empty;
|
||||
|
@ -11,7 +11,6 @@ using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Objects.Legacy;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
@ -142,8 +141,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
break;
|
||||
|
||||
case @"Mode":
|
||||
// TODO: ha ha ha.
|
||||
beatmap.BeatmapInfo.Ruleset = new RulesetInfo(Parsing.ParseInt(pair.Value), "some ruleset", "wangs", true /* probably not */);
|
||||
beatmap.BeatmapInfo.RulesetID = Parsing.ParseInt(pair.Value);
|
||||
|
||||
switch (beatmap.BeatmapInfo.RulesetID)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user