Replace F extension with string interpolation
This commit is contained in:
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.D2k.Lint
|
||||
foreach (var actorData in D2kMapImporter.ActorDataByActorCode.Values)
|
||||
{
|
||||
if (!rules.Actors.ContainsKey(actorData.Actor))
|
||||
emitError("Undefined actor {0} in map import code.".F(actorData.Actor));
|
||||
emitError($"Undefined actor {actorData.Actor} in map import code.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.D2k.SpriteLoaders
|
||||
var paletteOffset = s.ReadInt32();
|
||||
var bpp = s.ReadUInt8();
|
||||
if (bpp != 8)
|
||||
throw new InvalidDataException("Error: {0} bits per pixel are not supported.".F(bpp));
|
||||
throw new InvalidDataException($"Error: {bpp} bits per pixel are not supported.");
|
||||
|
||||
var frameHeight = s.ReadUInt8();
|
||||
var frameWidth = s.ReadUInt8();
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
UpdateSpriteLayers(cell, content.Sequence, index, content.Palette);
|
||||
}
|
||||
else
|
||||
throw new InvalidOperationException("SpriteMap does not contain an index for ClearSides type '{0}'".F(clear));
|
||||
throw new InvalidOperationException($"SpriteMap does not contain an index for ClearSides type '{clear}'");
|
||||
}
|
||||
else
|
||||
UpdateSpriteLayers(cell, null, 0, null);
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
{
|
||||
var kvp = ActorDataByActorCode[tileSpecialInfo];
|
||||
if (!rules.Actors.ContainsKey(kvp.Actor.ToLowerInvariant()))
|
||||
throw new InvalidOperationException("Actor with name {0} could not be found in the rules YAML file!".F(kvp.Actor));
|
||||
throw new InvalidOperationException($"Actor with name {kvp.Actor} could not be found in the rules YAML file!");
|
||||
|
||||
var a = new ActorReference(kvp.Actor)
|
||||
{
|
||||
@@ -487,8 +487,8 @@ namespace OpenRA.Mods.D2k.UtilityCommands
|
||||
if (template == null)
|
||||
{
|
||||
var pos = GetCurrentTilePositionOnMap();
|
||||
Console.WriteLine("Tile with index {0} could not be found in the tileset YAML file!".F(tileIndex));
|
||||
Console.WriteLine("Defaulting to a \"clear\" tile for coordinates ({0}, {1})!".F(pos.X, pos.Y));
|
||||
Console.WriteLine($"Tile with index {tileIndex} could not be found in the tileset YAML file!");
|
||||
Console.WriteLine($"Defaulting to a \"clear\" tile for coordinates ({pos.X}, {pos.Y})!");
|
||||
return clearTile;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user