1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 15:27:20 +08:00

Fix ManiaModInvert permanently messing up the beatmap

This commit is contained in:
Dan Balasescu 2024-07-01 14:58:53 +09:00
parent 4cb58fbe47
commit f942595829
No known key found for this signature in database
4 changed files with 17 additions and 3 deletions

View File

@ -7,6 +7,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Objects;
@ -49,6 +51,9 @@ namespace osu.Game.Beatmaps
original.BeatmapInfo = original.BeatmapInfo.Clone();
original.ControlPointInfo = original.ControlPointInfo.DeepClone();
// Used in osu!mania conversion.
original.Breaks = new BindableList<BreakPeriod>(original.Breaks);
return ConvertBeatmap(original, cancellationToken);
}

View File

@ -41,7 +41,7 @@ namespace osu.Game.Beatmaps
/// <summary>
/// The breaks in this beatmap.
/// </summary>
BindableList<BreakPeriod> Breaks { get; }
BindableList<BreakPeriod> Breaks { get; set; }
/// <summary>
/// All lines from the [Events] section which aren't handled in the encoding process yet.

View File

@ -328,7 +328,12 @@ namespace osu.Game.Rulesets.Difficulty
set => baseBeatmap.Difficulty = value;
}
public BindableList<BreakPeriod> Breaks => baseBeatmap.Breaks;
public BindableList<BreakPeriod> Breaks
{
get => baseBeatmap.Breaks;
set => baseBeatmap.Breaks = value;
}
public List<string> UnhandledEventLines => baseBeatmap.UnhandledEventLines;
public double TotalBreakTime => baseBeatmap.TotalBreakTime;

View File

@ -172,7 +172,11 @@ namespace osu.Game.Screens.Edit
set => PlayableBeatmap.ControlPointInfo = value;
}
public BindableList<BreakPeriod> Breaks => PlayableBeatmap.Breaks;
public BindableList<BreakPeriod> Breaks
{
get => PlayableBeatmap.Breaks;
set => PlayableBeatmap.Breaks = value;
}
public List<string> UnhandledEventLines => PlayableBeatmap.UnhandledEventLines;