put CheckAutotargetWiring in its own file

This commit is contained in:
Chris Forbes
2011-07-11 09:47:13 +12:00
committed by Paul Chote
parent 60a3f170ab
commit b1ee735f3b
3 changed files with 37 additions and 17 deletions

View File

@@ -36,20 +36,4 @@ namespace OpenRA.Mods.RA
}
}
}
class CheckAutotargetWiring : ILintPass
{
public void Run(Action<string> emitError)
{
foreach( var i in Rules.Info )
{
if (i.Key.StartsWith("^"))
continue;
var attackMove = i.Value.Traits.GetOrDefault<AttackMoveInfo>();
if (attackMove != null && !attackMove.JustMove &&
!i.Value.Traits.Contains<AutoTargetInfo>())
emitError( "{0} has AttackMove setup without AutoTarget, and will crash when resolving that order.".F(i.Key) );
}
}
}
}