Add ability for playlist items to be marked as invalid

This commit is contained in:
Dean Herbert
2021-11-16 17:01:24 +09:00
parent 49cdcffa30
commit aa188d5a52
2 changed files with 20 additions and 1 deletions

View File

@ -30,6 +30,11 @@ namespace osu.Game.Online.Rooms
[JsonProperty("expired")]
public bool Expired { get; set; }
[JsonIgnore]
public IBindable<bool> Valid => valid;
private readonly Bindable<bool> valid = new BindableBool(true);
[JsonIgnore]
public readonly Bindable<IBeatmapInfo> Beatmap = new Bindable<IBeatmapInfo>();
@ -69,6 +74,8 @@ namespace osu.Game.Online.Rooms
Ruleset.BindValueChanged(ruleset => RulesetID = ruleset.NewValue?.ID ?? 0);
}
public void MarkInvalid() => valid.Value = false;
public void MapObjects(RulesetStore rulesets)
{
Beatmap.Value ??= apiBeatmap;