diff --git a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs index 557e479627..07cbcc7971 100644 --- a/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs +++ b/OpenRA.Mods.RA/Lint/LintBuildablePrerequisites.cs @@ -20,7 +20,23 @@ namespace OpenRA.Mods.RA { public void Run(Action emitError) { - emitError("Hello World"); + /* do something intelligent here. */ } } + + class CheckAutotargetWiring : ILintPass + { + public void Run(Action emitError) + { + foreach( var i in Rules.Info ) + { + if (i.Key.StartsWith("^")) + continue; + var attackMove = i.Value.Traits.GetOrDefault(); + if (attackMove != null && !attackMove.JustMove && + !i.Value.Traits.Contains()) + emitError( "{0} has AttackMove setup without AutoTarget, and will crash when resolving that order.".F(i.Key) ); + } + } + } }