Fix Locomotor lint check

It was missing from the project file (oops...) and missing a check for duplicate Locomotor names.
This commit is contained in:
reaperrr
2018-05-04 11:40:36 +02:00
committed by abcdefg30
parent 43478e9e72
commit d6e0598bd0
2 changed files with 6 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ namespace OpenRA.Mods.Common.Lint
{
var worldActor = rules.Actors["world"];
var locomotorInfos = worldActor.TraitInfos<LocomotorInfo>().ToArray();
foreach (var li in locomotorInfos)
foreach (var otherLocomotor in locomotorInfos)
if (li != otherLocomotor && li.Name == otherLocomotor.Name)
emitError("There is more than one Locomotor with name {0}!".F(li.Name));
foreach (var actorInfo in rules.Actors)
{
foreach (var traitInfo in actorInfo.Value.TraitInfos<ITraitInfo>())