Move yaml removals to the end of the merge.

This commit is contained in:
Paul Chote
2015-05-10 16:07:11 +01:00
committed by Oliver Brakmann
parent a074bb1d4b
commit c7249e6fa6
12 changed files with 83 additions and 74 deletions

View File

@@ -32,8 +32,10 @@ namespace OpenRA.Mods.Common.Lint
this.emitError = emitError;
var sequenceSource = map != null ? map.SequenceDefinitions : new List<MiniYamlNode>();
sequenceDefinitions = MiniYaml.MergePartial(sequenceSource,
Game.ModData.Manifest.Sequences.Select(MiniYaml.FromFile).Aggregate(MiniYaml.MergePartial));
var partial = Game.ModData.Manifest.Sequences
.Select(MiniYaml.FromFile)
.Aggregate(MiniYaml.MergePartial);
sequenceDefinitions = MiniYaml.Merge(sequenceSource, partial);
var rules = map == null ? Game.ModData.DefaultRules : map.Rules;
var factions = rules.Actors["world"].TraitInfos<FactionInfo>().Select(f => f.InternalName).ToArray();