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

@@ -20,9 +20,11 @@ namespace OpenRA.Widgets
public static void Initialize(IEnumerable<string> yaml)
{
data = new Dictionary<string, string>();
var metrics = yaml.Select(y => MiniYaml.FromFile(y))
var partial = yaml
.Select(y => MiniYaml.FromFile(y))
.Aggregate(MiniYaml.MergePartial);
var metrics = MiniYaml.ApplyRemovals(partial);
foreach (var m in metrics)
foreach (var n in m.Value.Nodes)
data[n.Key] = n.Value.Value;