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