Remove hardcoded list of palette mod exclusions.

This commit is contained in:
Paul Chote
2013-02-21 18:48:31 +13:00
parent f593807617
commit db7887687b
17 changed files with 29 additions and 37 deletions

View File

@@ -20,6 +20,7 @@ namespace OpenRA.Mods.RA
public readonly string Tileset = null;
public readonly string Filename = null;
public readonly int[] ShadowIndex = { };
public readonly bool AllowModifiers = true;
public object Create(ActorInitializer init) { return new PaletteFromFile(init.world, this); }
}
@@ -34,10 +35,10 @@ namespace OpenRA.Mods.RA
this.info = info;
}
public void InitPalette( WorldRenderer wr )
public void InitPalette(WorldRenderer wr)
{
if( info.Tileset == null || info.Tileset.ToLowerInvariant() == world.Map.Tileset.ToLowerInvariant() )
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.ShadowIndex ) );
if (info.Tileset == null || info.Tileset.ToLowerInvariant() == world.Map.Tileset.ToLowerInvariant())
wr.AddPalette(info.Name, new Palette(FileSystem.Open(info.Filename), info.ShadowIndex), info.AllowModifiers);
}
}
}