diff --git a/OpenRA.Mods.Common/Lint/CheckLocomotorReferences.cs b/OpenRA.Mods.Common/Lint/CheckLocomotorReferences.cs index a0b6acc6e1..c5bb298434 100644 --- a/OpenRA.Mods.Common/Lint/CheckLocomotorReferences.cs +++ b/OpenRA.Mods.Common/Lint/CheckLocomotorReferences.cs @@ -22,6 +22,11 @@ namespace OpenRA.Mods.Common.Lint { var worldActor = rules.Actors["world"]; var locomotorInfos = worldActor.TraitInfos().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()) diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 356d795f6f..b4401276fe 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -197,6 +197,7 @@ +