Unhardcode internal terrain palette name from all over the codebase

This commit is contained in:
Pavel Penev
2016-01-02 16:30:43 +02:00
parent 0c51d73be9
commit 861d1368a4
14 changed files with 18 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
public class BibInfo : ITraitInfo, Requires<BuildingInfo>, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>
{
[SequenceReference] public readonly string Sequence = "bib";
[PaletteReference] public readonly string Palette = "terrain";
[PaletteReference] public readonly string Palette = TileSet.TerrainPaletteInternalName;
public readonly bool HasMinibib = false;
public object Create(ActorInitializer init) { return new Bib(init.Self, this); }

View File

@@ -192,7 +192,7 @@ namespace OpenRA.Mods.Common.Traits
{
if (!initialized)
{
var palette = wr.Palette("terrain");
var palette = wr.Palette(TileSet.TerrainPaletteInternalName);
renderables = new Dictionary<ushort, IRenderable[]>();
foreach (var t in info.Templates)
renderables.Add(t.First, TemplateRenderables(wr, palette, t.First));