diff --git a/OpenRA.Mods.Common/Traits/Cloak.cs b/OpenRA.Mods.Common/Traits/Cloak.cs index fd1afda2df..2746f526c2 100644 --- a/OpenRA.Mods.Common/Traits/Cloak.cs +++ b/OpenRA.Mods.Common/Traits/Cloak.cs @@ -15,6 +15,7 @@ using System.Drawing; using System.Linq; using OpenRA.Activities; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits @@ -34,6 +35,9 @@ namespace OpenRA.Mods.Common.Traits Dock = 256 } + // Type tag for cloaktypes + public class CloakType { } + [Desc("This unit can cloak and uncloak in specific situations.")] public class CloakInfo : ConditionalTraitInfo { @@ -53,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits [PaletteReference("IsPlayerPalette")] public readonly string Palette = "cloak"; public readonly bool IsPlayerPalette = false; - public readonly HashSet CloakTypes = new HashSet { "Cloak" }; + public readonly BitSet CloakTypes = new BitSet("Cloak"); [GrantedConditionReference] [Desc("The condition to grant to self while cloaked.")] diff --git a/OpenRA.Mods.Common/Traits/DetectCloaked.cs b/OpenRA.Mods.Common/Traits/DetectCloaked.cs index eea84a7be3..76d64b42a8 100644 --- a/OpenRA.Mods.Common/Traits/DetectCloaked.cs +++ b/OpenRA.Mods.Common/Traits/DetectCloaked.cs @@ -9,7 +9,7 @@ */ #endregion -using System.Collections.Generic; +using OpenRA.Primitives; namespace OpenRA.Mods.Common.Traits { @@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits public class DetectCloakedInfo : ConditionalTraitInfo { [Desc("Specific cloak classifications I can reveal.")] - public readonly HashSet CloakTypes = new HashSet { "Cloak" }; + public readonly BitSet CloakTypes = new BitSet("Cloak"); public readonly WDist Range = WDist.FromCells(5);