Replace F extension with string interpolation
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (!File.Exists(Path.Combine(baseSavePath, defaultSaveFilename + ".orasav")))
|
||||
break;
|
||||
|
||||
defaultSaveFilename = world.Map.Title + " ({0})".F(++filenameAttempt);
|
||||
defaultSaveFilename = world.Map.Title + $" ({++filenameAttempt})";
|
||||
}
|
||||
|
||||
var saveButton = panel.Get<ButtonWidget>("SAVE_BUTTON");
|
||||
@@ -132,7 +132,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
ConfirmationDialogs.ButtonPrompt(
|
||||
title: "Delete selected game save?",
|
||||
text: "Delete '{0}'?".F(Path.GetFileNameWithoutExtension(selectedSave)),
|
||||
text: $"Delete '{Path.GetFileNameWithoutExtension(selectedSave)}'?",
|
||||
onConfirm: () =>
|
||||
{
|
||||
Delete(selectedSave);
|
||||
@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
ConfirmationDialogs.ButtonPrompt(
|
||||
title: "Delete all game saves?",
|
||||
text: "Delete {0} game saves?".F(games.Count),
|
||||
text: $"Delete {games.Count} game saves?",
|
||||
onConfirm: () =>
|
||||
{
|
||||
foreach (var s in games.ToList())
|
||||
@@ -295,7 +295,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var orders = new List<Order>()
|
||||
{
|
||||
Order.FromTargetString("LoadGameSave", Path.GetFileName(selectedSave), true),
|
||||
Order.Command("state {0}".F(Session.ClientState.Ready))
|
||||
Order.Command($"state {Session.ClientState.Ready}")
|
||||
};
|
||||
|
||||
Game.CreateAndStartLocalServer(map.Uid, orders);
|
||||
@@ -322,7 +322,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
ConfirmationDialogs.ButtonPrompt(
|
||||
title: "Overwrite save game?",
|
||||
text: "Overwrite {0}?".F(saveTextField.Text),
|
||||
text: $"Overwrite {saveTextField.Text}?",
|
||||
onConfirm: inner,
|
||||
confirmText: "Overwrite",
|
||||
onCancel: () => { });
|
||||
|
||||
Reference in New Issue
Block a user