From 71ca0f028eb19de2fbbba1918a5b1daea749a70f Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 29 Apr 2011 17:25:13 +1200 Subject: [PATCH] remove some sillyness from LightPaletteRotator --- OpenRA.Mods.RA/LightPaletteRotator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/LightPaletteRotator.cs b/OpenRA.Mods.RA/LightPaletteRotator.cs index f0e1534171..80fca8631a 100644 --- a/OpenRA.Mods.RA/LightPaletteRotator.cs +++ b/OpenRA.Mods.RA/LightPaletteRotator.cs @@ -9,6 +9,7 @@ #endregion using System.Collections.Generic; +using System.Linq; using OpenRA.FileFormats; using OpenRA.Traits; @@ -23,12 +24,13 @@ namespace OpenRA.Mods.RA t += .5f; } + static readonly string[] ExcludePalettes = { "cursor", "chrome", "colorpicker" }; + public void AdjustPalette(Dictionary palettes) { - var excludePalettes = new List(){"cursor", "chrome", "colorpicker"}; foreach (var pal in palettes) { - if (excludePalettes.Contains(pal.Key)) + if (ExcludePalettes.Contains(pal.Key)) continue; var rotate = (int)t % 18;