Merge pull request #9710 from obrakmann/yaml-removals

Fix yaml removals
This commit is contained in:
Matthias Mailänder
2015-12-06 17:04:47 +01:00
16 changed files with 170 additions and 104 deletions

View File

@@ -33,7 +33,11 @@ namespace OpenRA.Graphics
cachedSheets = new Dictionary<string, Sheet>();
cachedSprites = new Dictionary<string, Dictionary<string, Sprite>>();
var chrome = chromeFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);
var partial = chromeFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(MiniYaml.MergePartial);
var chrome = MiniYaml.ApplyRemovals(partial);
foreach (var c in chrome)
LoadCollection(c.Key, c.Value);

View File

@@ -25,7 +25,11 @@ namespace OpenRA.Graphics
public CursorProvider(ModData modData)
{
var sequenceFiles = modData.Manifest.Cursors;
var sequences = new MiniYaml(null, sequenceFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
var partial = sequenceFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(MiniYaml.MergePartial);
var sequences = new MiniYaml(null, MiniYaml.ApplyRemovals(partial));
var shadowIndex = new int[] { };
var nodesDict = sequences.ToDictionary();

View File

@@ -127,10 +127,11 @@ namespace OpenRA.Graphics
{
var sequenceFiles = modData.Manifest.Sequences;
var nodes = sequenceFiles
var partial = sequenceFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(sequenceNodes, MiniYaml.MergeLiberal);
.Aggregate(sequenceNodes, MiniYaml.MergePartial);
var nodes = MiniYaml.ApplyRemovals(partial);
var items = new Dictionary<string, UnitSequences>();
foreach (var n in nodes)
{

View File

@@ -23,10 +23,11 @@ namespace OpenRA.Graphics
{
units = new Dictionary<string, Dictionary<string, Voxel>>();
var sequences = voxelFiles
var partial = voxelFiles
.Select(s => MiniYaml.FromFile(s))
.Aggregate(voxelNodes, MiniYaml.MergeLiberal);
.Aggregate(voxelNodes, MiniYaml.MergePartial);
var sequences = MiniYaml.ApplyRemovals(partial);
foreach (var s in sequences)
LoadVoxelsForUnit(s.Key, s.Value);