Add flow for copying existing difficulty content

This commit is contained in:
Bartłomiej Dach
2022-02-06 17:52:59 +01:00
parent 154460845b
commit a2c2b2bbb3
6 changed files with 125 additions and 19 deletions

View File

@ -841,7 +841,25 @@ namespace osu.Game.Screens.Edit
}
protected void CreateNewDifficulty(RulesetInfo rulesetInfo)
=> loader?.ScheduleSwitchToNewDifficulty(editorBeatmap.BeatmapInfo.BeatmapSet, rulesetInfo, GetState());
{
if (!rulesetInfo.Equals(editorBeatmap.BeatmapInfo.Ruleset))
{
switchToNewDifficulty(rulesetInfo, true);
return;
}
dialogOverlay.Push(new CreateNewDifficultyDialog(clearAllObjects => switchToNewDifficulty(rulesetInfo, clearAllObjects)));
}
private void switchToNewDifficulty(RulesetInfo rulesetInfo, bool clearAllObjects)
=> loader?.ScheduleSwitchToNewDifficulty(new NewDifficultyCreationParameters
{
BeatmapSet = editorBeatmap.BeatmapInfo.BeatmapSet,
Ruleset = rulesetInfo,
ReferenceBeatmap = playableBeatmap,
ClearAllObjects = clearAllObjects,
EditorState = GetState()
});
private EditorMenuItem createDifficultySwitchMenu()
{