Replace F extension with string interpolation
This commit is contained in:
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
||||
// SpriteFrameType refers to the channel byte order, which is reversed from the little-endian bit order
|
||||
case ImageFormat.Rgba32: Type = SpriteFrameType.Bgra32; break;
|
||||
case ImageFormat.Rgb24: Type = SpriteFrameType.Bgr24; break;
|
||||
default: throw new InvalidDataException("Unhandled ImageFormat {0}".F(dds.Format));
|
||||
default: throw new InvalidDataException($"Unhandled ImageFormat {dds.Format}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
|
||||
// SpriteFrameType refers to the channel byte order, which is reversed from the little-endian bit order
|
||||
case ImageFormat.Rgba32: Type = SpriteFrameType.Bgra32; break;
|
||||
case ImageFormat.Rgb24: Type = SpriteFrameType.Bgr24; break;
|
||||
default: throw new InvalidDataException("Unhandled ImageFormat {0}".F(tga.Format));
|
||||
default: throw new InvalidDataException($"Unhandled ImageFormat {tga.Format}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user