Display the correct version on generated wiki pages.

This commit is contained in:
Paul Chote
2019-03-22 08:19:43 +00:00
committed by reaperrr
parent d7ff894346
commit 90ddf24cf3
4 changed files with 23 additions and 10 deletions

View File

@@ -23,14 +23,19 @@ namespace OpenRA.Mods.Common.UtilityCommands
return true;
}
[Desc("Generate settings documentation in markdown format.")]
[Desc("[VERSION]", "Generate settings documentation in markdown format.")]
void IUtilityCommand.Run(Utility utility, string[] args)
{
Game.ModData = utility.ModData;
var version = utility.ModData.Manifest.Metadata.Version;
if (args.Length > 1)
version = args[1];
Console.WriteLine(
"This documentation displays annotated settings with default values and description. " +
"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.", utility.ModData.Manifest.Metadata.Version);
"automatically generated for version {0} of OpenRA.", version);
Console.WriteLine();
Console.WriteLine("All settings can be changed by starting the game via a command-line parameter like `Game.Mod=ra`.");
Console.WriteLine();