More HashSet trait fields & Lint support

This commit is contained in:
atlimit8
2015-09-05 15:54:00 -05:00
parent e74c0d6c13
commit 8250f223c4
57 changed files with 115 additions and 89 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Used for bursted one-colored whole screen effects. Add this to the world actor.")]
public class FlashPaletteEffectInfo : ITraitInfo
{
public readonly string[] ExcludePalettes = { "cursor", "chrome", "colorpicker", "fog", "shroud" };
public readonly HashSet<string> ExcludePalettes = new HashSet<string> { "cursor", "chrome", "colorpicker", "fog", "shroud" };
[Desc("Measured in ticks.")]
public readonly int Length = 20;

View File

@@ -8,6 +8,7 @@
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Graphics;
@@ -19,10 +20,10 @@ namespace OpenRA.Mods.Common.Traits
class GlobalLightingPaletteEffectInfo : ITraitInfo
{
[Desc("Do not modify graphics that use any palette in this list.")]
public readonly string[] ExcludePalettes = { "cursor", "chrome", "colorpicker", "fog", "shroud", "alpha" };
public readonly HashSet<string> ExcludePalettes = new HashSet<string> { "cursor", "chrome", "colorpicker", "fog", "shroud", "alpha" };
[Desc("Do not modify graphics that start with these letters.")]
public readonly string[] ExcludePalettePrefixes = { };
public readonly HashSet<string> ExcludePalettePrefixes = new HashSet<string>();
public readonly float Red = 1f;
public readonly float Green = 1f;

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Palette effect used for sprinkle \"animations\" on terrain tiles.")]
class WaterPaletteRotationInfo : ITraitInfo
{
public readonly string[] ExcludePalettes = { };
public readonly HashSet<string> ExcludePalettes = new HashSet<string>();
public object Create(ActorInitializer init) { return new WaterPaletteRotation(init.World, this); }
}