Improve Replaceable logic:

- Remove BuildingInfluence checks
- Support multiple Replaceable/Replacement traits on the same actors
- Fix description typos
This commit is contained in:
Paul Chote
2020-10-08 22:37:12 +01:00
committed by abcdefg30
parent 8aeec24c9b
commit daa8c74c37
4 changed files with 54 additions and 25 deletions

View File

@@ -16,15 +16,15 @@ namespace OpenRA.Mods.Common.Traits
public class ReplaceableInfo : ConditionalTraitInfo
{
[FieldLoader.Require]
[Desc("Replacement types this Relpaceable actor accepts.")]
[Desc("Replacement types this Replaceable actor accepts.")]
public readonly HashSet<string> Types = new HashSet<string>();
public override object Create(ActorInitializer init) { return new Replaceable(init, this); }
public override object Create(ActorInitializer init) { return new Replaceable(this); }
}
public class Replaceable : ConditionalTrait<ReplaceableInfo>
{
public Replaceable(ActorInitializer init, ReplaceableInfo info)
public Replaceable(ReplaceableInfo info)
: base(info) { }
}
}