Merge pull request #9384 from Mailaender/lint-player-palettes

Added a lint check for player palette references.
This commit is contained in:
Pavel Penev
2015-09-27 18:44:55 +03:00
23 changed files with 111 additions and 40 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Traits
[PaletteReference] public readonly string BasePalette = null;
[Desc("The prefix for the resulting player palettes")]
public readonly string BaseName = "player";
[PaletteDefinition(true)] public readonly string BaseName = "player";
[Desc("Remap these indices to player colors.")]
public readonly int[] RemapIndex = { };

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Traits
public class PlayerHighlightPaletteInfo : ITraitInfo
{
[Desc("The prefix for the resulting player palettes")]
public readonly string BaseName = "highlight";
[PaletteDefinition(true)] public readonly string BaseName = "highlight";
public object Create(ActorInitializer init) { return new PlayerHighlightPalette(this); }
}