mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Add safeties preventing creating multiple difficulties with same name
This commit is contained in:
@ -386,12 +386,20 @@ namespace osu.Game.Screens.Edit
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// save the loaded beatmap's data stream.
|
||||
beatmapManager.Save(editorBeatmap.BeatmapInfo, editorBeatmap.PlayableBeatmap, editorBeatmap.BeatmapSkin);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// can fail e.g. due to duplicated difficulty names.
|
||||
Logger.Error(ex, ex.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
// no longer new after first user-triggered save.
|
||||
isNewBeatmap = false;
|
||||
|
||||
// save the loaded beatmap's data stream.
|
||||
beatmapManager.Save(editorBeatmap.BeatmapInfo, editorBeatmap.PlayableBeatmap, editorBeatmap.BeatmapSkin);
|
||||
|
||||
updateLastSavedHash();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user