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

@@ -8,6 +8,7 @@
*/
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Traits;
@@ -19,7 +20,7 @@ namespace OpenRA.Mods.D2k.Traits
{
[WeaponReference]
public readonly string Weapon = "weathering";
public readonly string[] SafeTerrain = { "Concrete" };
public readonly HashSet<string> SafeTerrain = new HashSet<string> { "Concrete" };
public readonly int DamageThreshold = 50;
public object Create(ActorInitializer init) { return new DamagedWithoutFoundation(init.Self, this); }

View File

@@ -8,6 +8,7 @@
*/
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
@@ -22,7 +23,7 @@ namespace OpenRA.Mods.D2k.Traits
[FieldLoader.Require]
[Desc("The terrain types that this template will be placed on")]
public readonly string[] TerrainTypes = { };
public readonly HashSet<string> TerrainTypes = new HashSet<string>();
[Desc("Offset relative to the actor TopLeft. Not used if the template is PickAny")]
public readonly CVec Offset = CVec.Zero;