From a3b5f5a9a296cb579b315e5ddffcc33ee7c5f8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 2 May 2015 10:06:14 +0200 Subject: [PATCH 1/4] separate docs by namespace --- .../UtilityCommands/ExtractTraitDocsCommand.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs b/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs index 1353f53e75..5aa709fb48 100644 --- a/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/ExtractTraitDocsCommand.cs @@ -34,12 +34,20 @@ namespace OpenRA.Mods.Common.UtilityCommands var toc = new StringBuilder(); var doc = new StringBuilder(); + var currentNamespace = ""; foreach (var t in Game.ModData.ObjectCreator.GetTypesImplementing().OrderBy(t => t.Namespace)) { if (t.ContainsGenericParameters || t.IsAbstract) continue; // skip helpers like TraitInfo + 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; toc.AppendLine("* [{0}](#{1})".F(traitName, traitName.ToLowerInvariant())); var traitDescLines = t.GetCustomAttributes(false).SelectMany(d => d.Lines); From 50ae255395016df67629248b8d5394c7d8949896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 2 May 2015 10:07:26 +0200 Subject: [PATCH 2/4] don't hardcode hidden mods --- OpenRA.Game/ModMetadata.cs | 1 + OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs | 2 +- mods/modchooser/mod.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/ModMetadata.cs b/OpenRA.Game/ModMetadata.cs index e561434208..a3430d319a 100644 --- a/OpenRA.Game/ModMetadata.cs +++ b/OpenRA.Game/ModMetadata.cs @@ -23,6 +23,7 @@ namespace OpenRA public string Description; public string Version; public string Author; + public bool Hidden; static Dictionary ValidateMods() { diff --git a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs index 6a64dc1525..7672102c1c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs @@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; 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) .ToArray(); diff --git a/mods/modchooser/mod.yaml b/mods/modchooser/mod.yaml index 3309f74d2d..7cd5d7e2b5 100644 --- a/mods/modchooser/mod.yaml +++ b/mods/modchooser/mod.yaml @@ -2,6 +2,7 @@ Metadata: Title: Mod Chooser Version: {DEV_VERSION} Author: The OpenRA Developers + Hidden: true Folders: . From ebfd6eb8f641665695cceda212f484163d24bc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 2 May 2015 10:08:19 +0200 Subject: [PATCH 3/4] fix trait documentation leaving out certain namespaces --- Makefile | 3 +-- make.ps1 | 2 +- mods/all/mod.yaml | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 mods/all/mod.yaml diff --git a/Makefile b/Makefile index 3f5d97d132..6786fcb198 100644 --- a/Makefile +++ b/Makefile @@ -310,9 +310,8 @@ version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mo mv -f $${i}.tmp $${i} ; \ done -# Documentation (d2k depends on all mod libraries) 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 install: install-core diff --git a/make.ps1 b/make.ps1 index a765ee7f10..bf87e09ab0 100644 --- a/make.ps1 +++ b/make.ps1 @@ -160,7 +160,7 @@ elseif ($command -eq "check") elseif ($command -eq "docs") { ./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 } else diff --git a/mods/all/mod.yaml b/mods/all/mod.yaml new file mode 100644 index 0000000000..873795c001 --- /dev/null +++ b/mods/all/mod.yaml @@ -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 From 4dbdd365de22ea338d4ab675d4a4345ea17abe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 7 May 2015 21:25:32 +0200 Subject: [PATCH 4/4] also version the all helper mod --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6786fcb198..0c9dd6481d 100644 --- a/Makefile +++ b/Makefile @@ -304,7 +304,7 @@ cli-dependencies: native-dependencies: @./configure -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 \ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ mv -f $${i}.tmp $${i} ; \