check palette references

This commit is contained in:
Matthias Mailänder
2015-07-19 18:08:17 +02:00
parent ba8e292b71
commit 118782a85e
55 changed files with 191 additions and 58 deletions

View File

@@ -18,19 +18,25 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Creates a single color palette without any base palette file.")]
class PaletteFromRGBAInfo : ITraitInfo
{
[FieldLoader.Require]
[FieldLoader.Require, PaletteDefinition]
[Desc("internal palette name")]
public readonly string Name = null;
[Desc("If defined, load the palette only for this tileset.")]
public readonly string Tileset = null;
[Desc("red color component")]
public readonly int R = 0;
[Desc("green color component")]
public readonly int G = 0;
[Desc("blue color component")]
public readonly int B = 0;
[Desc("alpha channel (transparency)")]
public readonly int A = 255;
public readonly bool AllowModifiers = true;
public object Create(ActorInitializer init) { return new PaletteFromRGBA(init.World, this); }