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

@@ -25,16 +25,20 @@ namespace OpenRA.Mods.Common.UtilityCommands
return true;
}
[Desc("Generate trait documentation in MarkDown format.")]
[Desc("[VERSION]", "Generate trait documentation in MarkDown format.")]
void IUtilityCommand.Run(Utility utility, string[] args)
{
// HACK: The engine code assumes that Game.modData is set.
Game.ModData = utility.ModData;
var version = utility.ModData.Manifest.Metadata.Version;
if (args.Length > 1)
version = args[1];
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.", utility.ModData.Manifest.Metadata.Version);
"automatically generated for version {0} of OpenRA.", version);
Console.WriteLine();
var toc = new StringBuilder();