Merge pull request #8078 from Mailaender/make-all-docs
Fixed the trait documentation
This commit is contained in:
5
Makefile
5
Makefile
@@ -321,15 +321,14 @@ dependencies: $(os-dependencies)
|
|||||||
|
|
||||||
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
|
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
|
||||||
|
|
||||||
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml
|
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml
|
||||||
@for i in $? ; do \
|
@for i in $? ; do \
|
||||||
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
|
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
|
||||||
mv -f $${i}.tmp $${i} ; \
|
mv -f $${i}.tmp $${i} ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Documentation (d2k depends on all mod libraries)
|
|
||||||
docs: utility mods version
|
docs: utility mods version
|
||||||
@mono --debug OpenRA.Utility.exe d2k --docs > DOCUMENTATION.md
|
@mono --debug OpenRA.Utility.exe all --docs > DOCUMENTATION.md
|
||||||
@mono --debug OpenRA.Utility.exe ra --lua-docs > Lua-API.md
|
@mono --debug OpenRA.Utility.exe ra --lua-docs > Lua-API.md
|
||||||
|
|
||||||
install: install-core
|
install: install-core
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace OpenRA
|
|||||||
public string Description;
|
public string Description;
|
||||||
public string Version;
|
public string Version;
|
||||||
public string Author;
|
public string Author;
|
||||||
|
public bool Hidden;
|
||||||
|
|
||||||
static Dictionary<string, ModMetadata> ValidateMods()
|
static Dictionary<string, ModMetadata> ValidateMods()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,12 +34,20 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
|
|
||||||
var toc = new StringBuilder();
|
var toc = new StringBuilder();
|
||||||
var doc = new StringBuilder();
|
var doc = new StringBuilder();
|
||||||
|
var currentNamespace = "";
|
||||||
|
|
||||||
foreach (var t in Game.ModData.ObjectCreator.GetTypesImplementing<ITraitInfo>().OrderBy(t => t.Namespace))
|
foreach (var t in Game.ModData.ObjectCreator.GetTypesImplementing<ITraitInfo>().OrderBy(t => t.Namespace))
|
||||||
{
|
{
|
||||||
if (t.ContainsGenericParameters || t.IsAbstract)
|
if (t.ContainsGenericParameters || t.IsAbstract)
|
||||||
continue; // skip helpers like TraitInfo<T>
|
continue; // skip helpers like TraitInfo<T>
|
||||||
|
|
||||||
|
if (currentNamespace != t.Namespace)
|
||||||
|
{
|
||||||
|
currentNamespace = t.Namespace;
|
||||||
|
doc.AppendLine();
|
||||||
|
doc.AppendLine("## {0}".F(currentNamespace));
|
||||||
|
}
|
||||||
|
|
||||||
var traitName = t.Name.EndsWith("Info") ? t.Name.Substring(0, t.Name.Length - 4) : t.Name;
|
var traitName = t.Name.EndsWith("Info") ? t.Name.Substring(0, t.Name.Length - 4) : t.Name;
|
||||||
toc.AppendLine("* [{0}](#{1})".F(traitName, traitName.ToLowerInvariant()));
|
toc.AppendLine("* [{0}](#{1})".F(traitName, traitName.ToLowerInvariant()));
|
||||||
var traitDescLines = t.GetCustomAttributes<DescAttribute>(false).SelectMany(d => d.Lines);
|
var traitDescLines = t.GetCustomAttributes<DescAttribute>(false).SelectMany(d => d.Lines);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
};
|
};
|
||||||
|
|
||||||
sheetBuilder = new SheetBuilder(SheetType.BGRA);
|
sheetBuilder = new SheetBuilder(SheetType.BGRA);
|
||||||
allMods = ModMetadata.AllMods.Values.Where(m => m.Id != "modchooser")
|
allMods = ModMetadata.AllMods.Values.Where(m => !m.Hidden)
|
||||||
.OrderBy(m => m.Title)
|
.OrderBy(m => m.Title)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
|
|||||||
2
make.ps1
2
make.ps1
@@ -162,7 +162,7 @@ elseif ($command -eq "check")
|
|||||||
elseif ($command -eq "docs")
|
elseif ($command -eq "docs")
|
||||||
{
|
{
|
||||||
./make.ps1 version
|
./make.ps1 version
|
||||||
./OpenRA.Utility.exe d2k --docs | Out-File -Encoding "UTF8" DOCUMENTATION.md
|
./OpenRA.Utility.exe all --docs | Out-File -Encoding "UTF8" DOCUMENTATION.md
|
||||||
./OpenRA.Utility.exe ra --lua-docs | Out-File -Encoding "UTF8" Lua-API.md
|
./OpenRA.Utility.exe ra --lua-docs | Out-File -Encoding "UTF8" Lua-API.md
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
36
mods/all/mod.yaml
Normal file
36
mods/all/mod.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
Metadata:
|
||||||
|
Title: All mods
|
||||||
|
Version: {DEV_VERSION}
|
||||||
|
Author: The OpenRA Developers
|
||||||
|
Hidden: true
|
||||||
|
Description: Depending on all DLLs.
|
||||||
|
|
||||||
|
Folders:
|
||||||
|
.
|
||||||
|
|
||||||
|
Cursors:
|
||||||
|
|
||||||
|
Chrome:
|
||||||
|
|
||||||
|
Assemblies:
|
||||||
|
./mods/common/OpenRA.Mods.Common.dll
|
||||||
|
./mods/ra/OpenRA.Mods.RA.dll
|
||||||
|
./mods/d2k/OpenRA.Mods.D2k.dll
|
||||||
|
./mods/cnc/OpenRA.Mods.Cnc.dll
|
||||||
|
./mods/ts/OpenRA.Mods.TS.dll
|
||||||
|
|
||||||
|
ChromeLayout:
|
||||||
|
|
||||||
|
Notifications:
|
||||||
|
|
||||||
|
LoadScreen: BlankLoadScreen
|
||||||
|
|
||||||
|
ChromeMetrics:
|
||||||
|
|
||||||
|
Fonts:
|
||||||
|
|
||||||
|
LobbyDefaults:
|
||||||
|
|
||||||
|
SpriteFormats:
|
||||||
|
|
||||||
|
SpriteSequenceFormat: DefaultSpriteSequence
|
||||||
@@ -2,6 +2,7 @@ Metadata:
|
|||||||
Title: Mod Chooser
|
Title: Mod Chooser
|
||||||
Version: {DEV_VERSION}
|
Version: {DEV_VERSION}
|
||||||
Author: The OpenRA Developers
|
Author: The OpenRA Developers
|
||||||
|
Hidden: true
|
||||||
|
|
||||||
Folders:
|
Folders:
|
||||||
.
|
.
|
||||||
|
|||||||
Reference in New Issue
Block a user