also check map.yaml Sequences:

closes #4765
This commit is contained in:
Matthias Mailänder
2014-03-03 13:55:25 +01:00
parent 9a8c9d1985
commit cb43581c91
7 changed files with 11 additions and 10 deletions

View File

@@ -232,7 +232,7 @@ namespace OpenRA.Traits
Stance oldStance, Stance newStance);
}
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning); }
public interface ILintPass { void Run(Action<string> emitError, Action<string> emitWarning, Map map); }
public interface IObjectivesPanel { string ObjectivesPanel { get; } }

View File

@@ -68,7 +68,7 @@ namespace OpenRA.Lint
if (verbose)
Console.WriteLine("Pass: {0}".F(customPassType.ToString()));
customPass.Run(EmitError, EmitWarning);
customPass.Run(EmitError, EmitWarning, testMap);
}
catch (Exception e)
{

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA
{
Action<string> EmitError;
public void Run(Action<string> emitError, Action<string> emitWarning)
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
EmitError = emitError;

View File

@@ -17,10 +17,11 @@ namespace OpenRA.Mods.RA
{
class CheckSequences : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning)
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
var sequences = Game.modData.Manifest.Sequences
.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal);
var sequences = MiniYaml.MergeLiberal(map.Sequences,
Game.modData.Manifest.Sequences.Select(s => MiniYaml.FromFile(s))
.Aggregate(MiniYaml.MergeLiberal));
foreach (var actorInfo in Rules.Info)
foreach (var renderInfo in actorInfo.Value.Traits.WithInterface<RenderSimpleInfo>())

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
{
class CheckSyncAnnotations : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning)
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
/* first, check all the types implementing ISync */
foreach (var t in Game.modData.ObjectCreator.GetTypesImplementing<ISync>())

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA
{
public class CheckTraitPrerequisites : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning)
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
foreach (var actorInfo in Rules.Info.Where(a => !a.Key.StartsWith("^")))
try

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA
{
class LintBuildablePrerequisites : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning)
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
var providedPrereqs = Rules.Info.Keys.Concat(
Rules.Info.SelectMany(a => a.Value.Traits