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

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly Dictionary<string, TerrainInfo> TerrainSpeeds;
[Desc("e.g. crate, wall, infantry")]
public readonly string[] Crushes = { };
public readonly HashSet<string> Crushes = new HashSet<string>();
public readonly int WaitAverage = 5;
@@ -237,7 +237,7 @@ namespace OpenRA.Mods.Common.Traits
return false;
// If we cannot crush the other actor in our way, we are blocked.
if (self == null || Crushes == null || Crushes.Length == 0)
if (self == null || Crushes == null || Crushes.Count == 0)
return true;
// If the other actor in our way cannot be crushed, we are blocked.