Replace F extension with string interpolation
This commit is contained in:
@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
public void Do()
|
||||
{
|
||||
editorActorPreview = editorLayer.Add(actor);
|
||||
Text = "Added {0} ({1})".F(editorActorPreview.Info.Name, editorActorPreview.ID);
|
||||
Text = $"Added {editorActorPreview.Info.Name} ({editorActorPreview.ID})";
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
mapHeight = map.Height;
|
||||
mapResources = map.Resources;
|
||||
|
||||
Text = "Copied {0} tiles".F(tiles.Count);
|
||||
Text = $"Copied {tiles.Count} tiles";
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
this.editorActorLayer = editorActorLayer;
|
||||
this.actor = actor;
|
||||
|
||||
Text = "Removed {0} ({1})".F(actor.Info.Name, actor.ID);
|
||||
Text = $"Removed {actor.Info.Name} ({actor.ID})";
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
this.resourceLayer = resourceLayer;
|
||||
this.cell = cell;
|
||||
|
||||
Text = "Removed {0}".F(resourceType);
|
||||
Text = $"Removed {resourceType}";
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
cellResources.Add(resourceCell);
|
||||
|
||||
var cellText = cellResources.Count != 1 ? "cells" : "cell";
|
||||
Text = "Added {0} {1} of {2}".F(cellResources.Count, cellText, resourceType);
|
||||
Text = $"Added {cellResources.Count} {cellText} of {resourceType}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
|
||||
terrainTemplate = terrainInfo.Templates[template];
|
||||
Text = "Added tile {0}".F(terrainTemplate.Id);
|
||||
Text = $"Added tile {terrainTemplate.Id}";
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
@@ -239,7 +239,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
|
||||
terrainTemplate = terrainInfo.Templates[template];
|
||||
Text = "Filled with tile {0}".F(terrainTemplate.Id);
|
||||
Text = $"Filled with tile {terrainTemplate.Id}";
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
|
||||
Reference in New Issue
Block a user