1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

properly format strings per ruleset

This commit is contained in:
Nathan Alo 2021-03-17 18:31:09 +08:00
parent 133ff085a5
commit 51e0304c54
5 changed files with 9 additions and 1 deletions

View File

@ -120,5 +120,7 @@ namespace osu.Game.Rulesets.Catch.Objects
}
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
public override string ToEditorString() => (IndexInCurrentCombo + 1).ToString();
}
}

View File

@ -22,6 +22,8 @@ namespace osu.Game.Rulesets.Mania.Objects
protected override HitWindows CreateHitWindows() => new ManiaHitWindows();
public override string ToEditorString() => $"{StartTime}|{Column}";
#region LegacyBeatmapEncoder
float IHasXPosition.X => Column;

View File

@ -130,5 +130,7 @@ namespace osu.Game.Rulesets.Osu.Objects
}
protected override HitWindows CreateHitWindows() => new OsuHitWindows();
public override string ToEditorString() => (IndexInCurrentCombo + 1).ToString();
}
}

View File

@ -168,6 +168,8 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
[NotNull]
protected virtual HitWindows CreateHitWindows() => new HitWindows();
public virtual string ToEditorString() => string.Empty;
}
public static class HitObjectExtensions

View File

@ -558,7 +558,7 @@ namespace osu.Game.Screens.Edit
{
var orderedHitObjects = editorBeatmap.SelectedHitObjects.OrderBy(h => h.StartTime);
builder.Append(orderedHitObjects.FirstOrDefault().StartTime.ToEditorFormattedString());
builder.Append($" ({string.Join(',', orderedHitObjects.Cast<IHasComboInformation>().Select(h => h.IndexInCurrentCombo + 1))})");
builder.Append($" ({string.Join(',', orderedHitObjects.Select(h => h.ToEditorString()))})");
clipboard.Value = new ClipboardContent(editorBeatmap).Serialize();
}