diff --git a/OpenRA.Mods.Common/Lint/CheckActors.cs b/OpenRA.Mods.Common/Lint/CheckActors.cs index b6273c00a8..0827af75eb 100644 --- a/OpenRA.Mods.Common/Lint/CheckActors.cs +++ b/OpenRA.Mods.Common/Lint/CheckActors.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Lint { public class CheckActors : ILintMapPass { - public void Run(Action emitError, Action emitWarning, Map map) + public void Run(Action emitError, Action emitWarning, ModData modData, Map map) { var actorTypes = map.ActorDefinitions.Select(a => a.Value.Value); foreach (var actor in actorTypes) diff --git a/OpenRA.Mods.Common/Lint/CheckMapCordon.cs b/OpenRA.Mods.Common/Lint/CheckMapCordon.cs index 5ee88e2ebe..b841bc89cd 100644 --- a/OpenRA.Mods.Common/Lint/CheckMapCordon.cs +++ b/OpenRA.Mods.Common/Lint/CheckMapCordon.cs @@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.Lint { public class CheckMapCordon : ILintMapPass { - public void Run(Action emitError, Action emitWarning, Map map) + public void Run(Action emitError, Action emitWarning, ModData modData, Map map) { if (map.Bounds.Left == 0 || map.Bounds.Top == 0 || map.Bounds.Right == map.MapSize.X || map.Bounds.Bottom == map.MapSize.Y) diff --git a/OpenRA.Mods.Common/Lint/CheckMapMetadata.cs b/OpenRA.Mods.Common/Lint/CheckMapMetadata.cs index feb797ecae..79b9ec45d4 100644 --- a/OpenRA.Mods.Common/Lint/CheckMapMetadata.cs +++ b/OpenRA.Mods.Common/Lint/CheckMapMetadata.cs @@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Lint { public class CheckMapMetadata : ILintMapPass { - public void Run(Action emitError, Action emitWarning, Map map) + public void Run(Action emitError, Action emitWarning, ModData modData, Map map) { if (map.MapFormat != Map.SupportedMapFormat) emitError("Map format {0} does not match the supported version {1}." diff --git a/OpenRA.Mods.Common/Lint/CheckPlayers.cs b/OpenRA.Mods.Common/Lint/CheckPlayers.cs index cae1438e1e..7fa3b7e976 100644 --- a/OpenRA.Mods.Common/Lint/CheckPlayers.cs +++ b/OpenRA.Mods.Common/Lint/CheckPlayers.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Lint { public class CheckPlayers : ILintMapPass { - public void Run(Action emitError, Action emitWarning, Map map) + public void Run(Action emitError, Action emitWarning, ModData modData, Map map) { var players = new MapPlayers(map.PlayerDefinitions).Players; var worldOwnerFound = false; diff --git a/OpenRA.Mods.Common/Lint/CheckSequences.cs b/OpenRA.Mods.Common/Lint/CheckSequences.cs index 1fb7e366a2..3aed5f4258 100644 --- a/OpenRA.Mods.Common/Lint/CheckSequences.cs +++ b/OpenRA.Mods.Common/Lint/CheckSequences.cs @@ -25,12 +25,11 @@ namespace OpenRA.Mods.Common.Lint List sequenceDefinitions; - public void Run(Action emitError, Action emitWarning, Map map) + public void Run(Action emitError, Action emitWarning, ModData modData, Map map) { if (map.SequenceDefinitions == null) return; - var modData = Game.ModData; this.emitError = emitError; sequenceDefinitions = MiniYaml.Load(map, modData.Manifest.Sequences, map.SequenceDefinitions); diff --git a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs index f78dd21aed..4c50574f35 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs @@ -105,7 +105,7 @@ namespace OpenRA.Mods.Common.UtilityCommands try { var customMapPass = (ILintMapPass)modData.ObjectCreator.CreateBasic(customMapPassType); - customMapPass.Run(EmitError, EmitWarning, testMap); + customMapPass.Run(EmitError, EmitWarning, modData, testMap); } catch (Exception e) { diff --git a/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs b/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs index 0e2ae93c59..020d75d8ae 100644 --- a/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs +++ b/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs @@ -14,6 +14,6 @@ using System; namespace OpenRA.Mods.Common.Lint { public interface ILintPass { void Run(Action emitError, Action emitWarning, ModData modData); } - public interface ILintMapPass { void Run(Action emitError, Action emitWarning, Map map); } + public interface ILintMapPass { void Run(Action emitError, Action emitWarning, ModData modData, Map map); } public interface ILintRulesPass { void Run(Action emitError, Action emitWarning, Ruleset rules); } }