beef up OpenRA.FileFormats.Set a little; use it in CncMenuPaletteEffect rather than making new List<string> every frame

This commit is contained in:
Chris Forbes
2012-04-25 21:43:00 +12:00
parent a0940e7ae5
commit dadc496c19
3 changed files with 11 additions and 3 deletions

View File

@@ -61,12 +61,13 @@ namespace OpenRA.Mods.Cnc
}
}
static Set<string> excludePalettes = new Set<string>("cursor", "chrome", "colorpicker", "shroud", "fog");
public void AdjustPalette(Dictionary<string,Palette> palettes)
{
if (to == EffectType.None && remainingFrames == 0)
return;
var excludePalettes = new List<string>(){"cursor", "chrome", "colorpicker", "shroud", "fog"};
foreach (var pal in palettes)
{
if (excludePalettes.Contains(pal.Key))