Add support for TS-style random tile variants.

This commit is contained in:
Paul Chote
2015-03-28 19:05:50 +00:00
parent 0b4ec5a815
commit 4be5334a0e
10 changed files with 285 additions and 250 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenRA.Editor
var frameCache = new FrameCache(Game.ModData.SpriteLoaders);
foreach (var t in tileset.Templates)
{
var allFrames = frameCache[t.Value.Image];
var allFrames = frameCache[t.Value.Image[0]];
var frames = t.Value.Frames != null ? t.Value.Frames.Select(f => allFrames[f]).ToArray() : allFrames;
templates.Add(t.Value.Id, frames.Select(f => ExtractSquareTile(f)).ToArray());
}