mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Apply some renames to convey difference between creation options better
This commit is contained in:
@ -113,7 +113,7 @@ namespace osu.Game.Beatmaps
|
|||||||
/// The new difficulty will be backed by a <see cref="BeatmapInfo"/> model
|
/// The new difficulty will be backed by a <see cref="BeatmapInfo"/> model
|
||||||
/// and represented by the returned <see cref="WorkingBeatmap"/>.
|
/// and represented by the returned <see cref="WorkingBeatmap"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual WorkingBeatmap CreateNewBlankDifficulty(NewDifficultyCreationParameters creationParameters)
|
public virtual WorkingBeatmap CreateNewDifficulty(NewDifficultyCreationParameters creationParameters)
|
||||||
{
|
{
|
||||||
var referenceBeatmap = creationParameters.ReferenceBeatmap;
|
var referenceBeatmap = creationParameters.ReferenceBeatmap;
|
||||||
var targetBeatmapSet = creationParameters.BeatmapSet;
|
var targetBeatmapSet = creationParameters.BeatmapSet;
|
||||||
@ -121,7 +121,7 @@ namespace osu.Game.Beatmaps
|
|||||||
BeatmapInfo newBeatmapInfo;
|
BeatmapInfo newBeatmapInfo;
|
||||||
IBeatmap newBeatmap;
|
IBeatmap newBeatmap;
|
||||||
|
|
||||||
if (creationParameters.ClearAllObjects)
|
if (creationParameters.CreateBlank)
|
||||||
{
|
{
|
||||||
newBeatmapInfo = new BeatmapInfo(creationParameters.Ruleset, new BeatmapDifficulty(), referenceBeatmap.Metadata.DeepClone());
|
newBeatmapInfo = new BeatmapInfo(creationParameters.Ruleset, new BeatmapDifficulty(), referenceBeatmap.Metadata.DeepClone());
|
||||||
newBeatmap = new Beatmap { BeatmapInfo = newBeatmapInfo };
|
newBeatmap = new Beatmap { BeatmapInfo = newBeatmapInfo };
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
public CreateNewDifficultyDialog(CreateNewDifficulty createNewDifficulty)
|
public CreateNewDifficultyDialog(CreateNewDifficulty createNewDifficulty)
|
||||||
{
|
{
|
||||||
HeaderText = "Would you like to clear all objects?";
|
HeaderText = "Would you like to create a blank difficulty?";
|
||||||
|
|
||||||
Icon = FontAwesome.Regular.Clone;
|
Icon = FontAwesome.Regular.Clone;
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return beatmapManager.CreateNewBlankDifficulty(creationParameters);
|
return beatmapManager.CreateNewDifficulty(creationParameters);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -32,9 +32,14 @@ namespace osu.Game.Screens.Edit
|
|||||||
public ISkin? ReferenceBeatmapSkin { get; }
|
public ISkin? ReferenceBeatmapSkin { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether all objects should be cleared from the new difficulty.
|
/// Whether the new difficulty should be blank.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ClearAllObjects { get; }
|
/// <remarks>
|
||||||
|
/// A blank difficulty will have no objects, no control points other than timing points taken from <see cref="ReferenceBeatmap"/>
|
||||||
|
/// and will not share <see cref="BeatmapInfo"/> values with <see cref="ReferenceBeatmap"/>,
|
||||||
|
/// but it will share metadata and timing information with <see cref="ReferenceBeatmap"/>.
|
||||||
|
/// </remarks>
|
||||||
|
public bool CreateBlank { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The saved state of the previous <see cref="Editor"/> which should be restored upon opening the newly-created difficulty.
|
/// The saved state of the previous <see cref="Editor"/> which should be restored upon opening the newly-created difficulty.
|
||||||
@ -46,14 +51,14 @@ namespace osu.Game.Screens.Edit
|
|||||||
RulesetInfo ruleset,
|
RulesetInfo ruleset,
|
||||||
IBeatmap referenceBeatmap,
|
IBeatmap referenceBeatmap,
|
||||||
ISkin? referenceBeatmapSkin,
|
ISkin? referenceBeatmapSkin,
|
||||||
bool clearAllObjects,
|
bool createBlank,
|
||||||
EditorState editorState)
|
EditorState editorState)
|
||||||
{
|
{
|
||||||
BeatmapSet = beatmapSet;
|
BeatmapSet = beatmapSet;
|
||||||
Ruleset = ruleset;
|
Ruleset = ruleset;
|
||||||
ReferenceBeatmap = referenceBeatmap;
|
ReferenceBeatmap = referenceBeatmap;
|
||||||
ReferenceBeatmapSkin = referenceBeatmapSkin;
|
ReferenceBeatmapSkin = referenceBeatmapSkin;
|
||||||
ClearAllObjects = clearAllObjects;
|
CreateBlank = createBlank;
|
||||||
EditorState = editorState;
|
EditorState = editorState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
return new TestWorkingBeatmapCache(this, audioManager, resources, storage, defaultBeatmap, host);
|
return new TestWorkingBeatmapCache(this, audioManager, resources, storage, defaultBeatmap, host);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override WorkingBeatmap CreateNewBlankDifficulty(NewDifficultyCreationParameters creationParameters)
|
public override WorkingBeatmap CreateNewDifficulty(NewDifficultyCreationParameters creationParameters)
|
||||||
{
|
{
|
||||||
// don't actually care about properly creating a difficulty for this context.
|
// don't actually care about properly creating a difficulty for this context.
|
||||||
return TestBeatmap;
|
return TestBeatmap;
|
||||||
|
Reference in New Issue
Block a user