@@ -9,7 +9,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Mods.Common;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
@@ -22,7 +21,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[Desc("Uses the \"Cloneable\" trait to determine whether or not we should clone a produced unit.")]
|
||||
public readonly HashSet<string> CloneableTypes = new HashSet<string>();
|
||||
public readonly BitSet<CloneableType> CloneableTypes = default(BitSet<CloneableType>);
|
||||
|
||||
public object Create(ActorInitializer init) { return new ClonesProducedUnits(init, this); }
|
||||
}
|
||||
|
||||
@@ -10,16 +10,20 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
// Type tag for CloneableTypes
|
||||
public class CloneableType { }
|
||||
|
||||
[Desc("Actors with the \"ClonesProducedUnits\" trait will produce a free duplicate of me.")]
|
||||
public class CloneableInfo : TraitInfo<Cloneable>
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[Desc("This unit's cloneable type is:")]
|
||||
public readonly HashSet<string> Types = new HashSet<string>();
|
||||
public readonly BitSet<CloneableType> Types = default(BitSet<CloneableType>);
|
||||
}
|
||||
|
||||
public class Cloneable { }
|
||||
|
||||
Reference in New Issue
Block a user