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

@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
var coords = frame.Split(';');
var region = FieldLoader.GetValue<Rectangle>("Region", coords[0]);
if (!pngRectangle.Contains(region))
throw new InvalidDataException("Invalid frame regions {0} defined.".F(region));
throw new InvalidDataException($"Invalid frame regions {region} defined.");
regions.Add(region);
offsets.Add(FieldLoader.GetValue<float2>("Offset", coords[1]));
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
var rows = (frameAmount + framesPerRow - 1) / framesPerRow;
if (png.Width < frameSize.Width * frameAmount / rows || png.Height < frameSize.Height * rows)
throw new InvalidDataException("Invalid frame size {0} and frame amount {1} defined.".F(frameSize, frameAmount));
throw new InvalidDataException($"Invalid frame size {frameSize} and frame amount {frameAmount} defined.");
regions = new List<Rectangle>();
offsets = new List<float2>();