Add filenames to Trait/Weapon/SpriteSequence docs metadata.

This commit is contained in:
Paul Chote
2025-01-05 20:01:50 +00:00
committed by Pavel Penev
parent 0efbefc62a
commit 711055a3bc
4 changed files with 57 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
static string GenerateJson(string version, IEnumerable<Type> sequenceTypes)
{
var relatedEnumTypes = new HashSet<Type>();
var pdbReaderCache = Utilities.CreatePdbReaderCache();
var sequenceTypesInfo = sequenceTypes
.Where(x => !x.ContainsGenericParameters && !x.IsAbstract)
@@ -58,6 +59,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
type.Namespace,
type.Name,
Description = string.Join(" ", Utility.GetCustomAttributes<DescAttribute>(type, false).SelectMany(d => d.Lines)),
Filename = Utilities.GetSourceFilenameFromPdb(type, pdbReaderCache),
InheritedTypes = type.BaseTypes()
.Select(y => y.Name)
.Where(y => y != type.Name && y != "Object"),