Display the correct version on generated wiki pages.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user