mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Remove return type from AddDifficultyToBeatmapSet
Also removes a pointless realm encapsulation.
This commit is contained in:
@ -128,10 +128,10 @@ namespace osu.Game.Beatmaps
|
||||
foreach (var timingPoint in referenceBeatmap.Beatmap.ControlPointInfo.TimingPoints)
|
||||
newBeatmap.ControlPointInfo.Add(timingPoint.Time, timingPoint.DeepClone());
|
||||
|
||||
var createdBeatmapInfo = beatmapModelManager.AddDifficultyToBeatmapSet(beatmapSetInfo, newBeatmap);
|
||||
beatmapModelManager.AddDifficultyToBeatmapSet(beatmapSetInfo, newBeatmap);
|
||||
|
||||
workingBeatmapCache.Invalidate(createdBeatmapInfo.BeatmapSet);
|
||||
return GetWorkingBeatmap(createdBeatmapInfo);
|
||||
workingBeatmapCache.Invalidate(beatmapSetInfo);
|
||||
return GetWorkingBeatmap(newBeatmap.BeatmapInfo);
|
||||
}
|
||||
|
||||
// TODO: add back support for making a copy of another difficulty
|
||||
|
@ -93,9 +93,7 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// Add a new difficulty to the beatmap set represented by the provided <see cref="BeatmapSetInfo"/>.
|
||||
/// </summary>
|
||||
public BeatmapInfo AddDifficultyToBeatmapSet(BeatmapSetInfo beatmapSetInfo, Beatmap beatmap)
|
||||
{
|
||||
return Realm.Run(realm =>
|
||||
public void AddDifficultyToBeatmapSet(BeatmapSetInfo beatmapSetInfo, Beatmap beatmap)
|
||||
{
|
||||
var beatmapInfo = beatmap.BeatmapInfo;
|
||||
|
||||
@ -103,9 +101,6 @@ namespace osu.Game.Beatmaps
|
||||
beatmapInfo.BeatmapSet = beatmapSetInfo;
|
||||
|
||||
Save(beatmapInfo, beatmap);
|
||||
|
||||
return beatmapInfo.Detach();
|
||||
});
|
||||
}
|
||||
|
||||
private static string getFilename(BeatmapInfo beatmapInfo)
|
||||
|
Reference in New Issue
Block a user