More HashSet trait fields & Lint support
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Primitives;
|
||||
@@ -28,10 +29,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly int SpawnInterval = 180;
|
||||
|
||||
[Desc("Which terrain types can we drop on?")]
|
||||
public readonly string[] ValidGround = { "Clear", "Rough", "Road", "Ore", "Beach" };
|
||||
public readonly HashSet<string> ValidGround = new HashSet<string> { "Clear", "Rough", "Road", "Ore", "Beach" };
|
||||
|
||||
[Desc("Which terrain types count as water?")]
|
||||
public readonly string[] ValidWater = { "Water" };
|
||||
public readonly HashSet<string> ValidWater = new HashSet<string> { "Water" };
|
||||
|
||||
[Desc("Chance of generating a water crate instead of a land crate")]
|
||||
public readonly float WaterChance = .2f;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
@@ -22,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string ClassName = "Unlabeled";
|
||||
|
||||
[Desc("Only available when selecting one of these factions.", "Leave empty for no restrictions.")]
|
||||
public readonly string[] Factions = { };
|
||||
public readonly HashSet<string> Factions = new HashSet<string>();
|
||||
|
||||
[Desc("The mobile construction vehicle.")]
|
||||
public readonly string BaseActor = null;
|
||||
|
||||
Reference in New Issue
Block a user