Replace F extension with string interpolation

This commit is contained in:
teinarss
2021-04-24 17:46:24 +02:00
committed by reaperrr
parent 1385aca783
commit 10676be377
300 changed files with 752 additions and 799 deletions

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (mapPackage != null)
sequences = new Map(modData, mapPackage).Rules.Sequences;
else if (!modData.DefaultSequences.TryGetValue(args[2], out sequences))
throw new InvalidOperationException("{0} is not a valid tileset or map path".F(args[2]));
throw new InvalidOperationException($"{args[2]} is not a valid tileset or map path");
sequences.Preload();
@@ -50,12 +50,12 @@ namespace OpenRA.Mods.Common.UtilityCommands
{
var max = s == sb.Current ? (int)sb.CurrentChannel + 1 : 4;
for (var i = 0; i < max; i++)
s.AsPng((TextureChannel)ChannelMasks[i], palette).Save("{0}.png".F(count++));
s.AsPng((TextureChannel)ChannelMasks[i], palette).Save($"{count++}.png");
}
sb = sequences.SpriteCache.SheetBuilders[SheetType.BGRA];
foreach (var s in sb.AllSheets)
s.AsPng().Save("{0}.png".F(count++));
s.AsPng().Save($"{count++}.png");
Console.WriteLine("Saved [0..{0}].png", count - 1);
}