diff --git a/Content.YAMLLinter/Program.cs b/Content.YAMLLinter/Program.cs index 4ba7b9c12c2..b7b70bd1188 100644 --- a/Content.YAMLLinter/Program.cs +++ b/Content.YAMLLinter/Program.cs @@ -77,7 +77,26 @@ private static async Task Main(string[] _) await instance.WaitPost(() => { + var engineErrors = protoMan.ValidateDirectory(new ResPath("/EnginePrototypes"), out var engPrototypes); yamlErrors = protoMan.ValidateDirectory(new ResPath("/Prototypes"), out var prototypes); + + // Merge engine & content prototypes + foreach (var (kind, instances) in engPrototypes) + { + if (prototypes.TryGetValue(kind, out var existing)) + existing.UnionWith(instances); + else + prototypes[kind] = instances; + } + + foreach (var (kind, set) in engineErrors) + { + if (yamlErrors.TryGetValue(kind, out var existing)) + existing.UnionWith(set); + else + yamlErrors[kind] = set; + } + fieldErrors = protoMan.ValidateFields(prototypes); });