diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractSettingsDocsCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractSettingsDocsCommand.cs index b6e6cd3f37..ea28f59daa 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractSettingsDocsCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractSettingsDocsCommand.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.UtilityCommands { var fields = section.Value.GetType().GetFields(); if (fields.Length > 0 && fields.Where(field => field.GetCustomAttributes(false).Length > 0).Count() > 0) - Console.WriteLine("## {0}", section.Key); + Console.WriteLine($"## {section.Key}"); else Console.WriteLine(); @@ -69,11 +69,11 @@ namespace OpenRA.Mods.Common.UtilityCommands if (!field.HasAttribute()) continue; - Console.WriteLine("### {0}", field.Name); + Console.WriteLine($"### {field.Name}"); var lines = field.GetCustomAttributes(false).SelectMany(d => d.Lines); foreach (var line in lines) { - Console.WriteLine("{0}", line); + Console.WriteLine(line); Console.WriteLine(); } @@ -83,8 +83,8 @@ namespace OpenRA.Mods.Common.UtilityCommands Console.WriteLine("**Default Value:** {0}", value); Console.WriteLine(); Console.WriteLine("```yaml"); - Console.WriteLine("{0}: ", section.Key); - Console.WriteLine("\t{0}: {1}", field.Name, value); + Console.WriteLine($"{section.Key}: "); + Console.WriteLine($"\t{field.Name}: {value}"); Console.WriteLine("```"); } else diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs index 095622a466..29490c379b 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2021 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2022 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.UtilityCommands Console.WriteLine( "This documentation is aimed at modders. It displays all traits with default values and developer commentary. " + "Please do not edit it directly, but add new `[Desc(\"String\")]` tags to the source code. This file has been " + - "automatically generated for version {0} of OpenRA.", version); + $"automatically generated for version {version} of OpenRA."); Console.WriteLine(); var doc = new StringBuilder(); diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractWeaponDocsCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractWeaponDocsCommand.cs index 6d52f8b098..6364d0f584 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractWeaponDocsCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractWeaponDocsCommand.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2021 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2022 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of @@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.UtilityCommands "This documentation is aimed at modders. It displays a template for weapon definitions " + "as well as its contained types (warheads and projectiles) with default values and developer commentary. " + "Please do not edit it directly, but add new `[Desc(\"String\")]` tags to the source code. This file has been " + - "automatically generated for version {0} of OpenRA.", version); + $"automatically generated for version {version} of OpenRA."); Console.WriteLine(); var doc = new StringBuilder();