diff --git a/Makefile b/Makefile index ddce250222..43a033a547 100644 --- a/Makefile +++ b/Makefile @@ -321,15 +321,14 @@ dependencies: $(os-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 \ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ 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/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/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); 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/make.ps1 b/make.ps1 index 1f4259ef21..53b175c40c 100644 --- a/make.ps1 +++ b/make.ps1 @@ -162,7 +162,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 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: .