Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into upstream-sync2
Browse files Browse the repository at this point in the history
  • Loading branch information
Morb0 committed Sep 19, 2023
2 parents 60a0a98 + 39af74e commit 5bbc4a6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Content.YAMLLinter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,26 @@ private static async Task<int> 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);
});

Expand Down

0 comments on commit 5bbc4a6

Please sign in to comment.