mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +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
|
#region Compatibility properties
|
||||||
|
|
||||||
|
private int rulesetID;
|
||||||
|
|
||||||
[Ignored]
|
[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]
|
[Ignored]
|
||||||
public Guid BeatmapSetInfoID => BeatmapSet?.ID ?? Guid.Empty;
|
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.Legacy;
|
||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.IO;
|
using osu.Game.IO;
|
||||||
using osu.Game.Rulesets;
|
|
||||||
using osu.Game.Rulesets.Objects.Legacy;
|
using osu.Game.Rulesets.Objects.Legacy;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Formats
|
namespace osu.Game.Beatmaps.Formats
|
||||||
@ -142,8 +141,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Mode":
|
case @"Mode":
|
||||||
// TODO: ha ha ha.
|
beatmap.BeatmapInfo.RulesetID = Parsing.ParseInt(pair.Value);
|
||||||
beatmap.BeatmapInfo.Ruleset = new RulesetInfo(Parsing.ParseInt(pair.Value), "some ruleset", "wangs", true /* probably not */);
|
|
||||||
|
|
||||||
switch (beatmap.BeatmapInfo.RulesetID)
|
switch (beatmap.BeatmapInfo.RulesetID)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user