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