More HashSet trait fields & Lint support
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user