From e54cf9acc3afa6e3be2ac274658750b07b3847ea Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 7 Sep 2017 19:47:18 +0000 Subject: [PATCH] Move linter interfaces to Mods.Common. --- OpenRA.Game/Traits/TraitsInterfaces.cs | 4 ---- OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 + .../UtilityCommands/CheckYaml.cs | 2 +- .../UtilityCommands/LintInterfaces.cs | 19 +++++++++++++++++++ OpenRA.Mods.D2k/Lint/CheckImportActors.cs | 2 +- 5 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 70fac96fa2..537ef15458 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -353,10 +353,6 @@ namespace OpenRA.Traits IEnumerable TargetablePositions(Actor self); } - public interface ILintPass { void Run(Action emitError, Action emitWarning, ModData modData); } - public interface ILintMapPass { void Run(Action emitError, Action emitWarning, Map map); } - public interface ILintRulesPass { void Run(Action emitError, Action emitWarning, Ruleset rules); } - public interface IObjectivesPanel { string PanelName { get; } diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 9371ee7322..cc418448e5 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -817,6 +817,7 @@ + diff --git a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs index d06eb78cd3..f376927e63 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CheckYaml.cs @@ -13,7 +13,7 @@ using System; using System.Collections.Generic; using System.Linq; using OpenRA.FileSystem; -using OpenRA.Traits; +using OpenRA.Mods.Common.Lint; namespace OpenRA.Mods.Common.UtilityCommands { diff --git a/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs b/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs new file mode 100644 index 0000000000..847a353039 --- /dev/null +++ b/OpenRA.Mods.Common/UtilityCommands/LintInterfaces.cs @@ -0,0 +1,19 @@ +#region Copyright & License Information +/* + * Copyright 2007-2017 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +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 ILintRulesPass { void Run(Action emitError, Action emitWarning, Ruleset rules); } +} diff --git a/OpenRA.Mods.D2k/Lint/CheckImportActors.cs b/OpenRA.Mods.D2k/Lint/CheckImportActors.cs index d56f99f4f2..213fde4a5c 100644 --- a/OpenRA.Mods.D2k/Lint/CheckImportActors.cs +++ b/OpenRA.Mods.D2k/Lint/CheckImportActors.cs @@ -10,8 +10,8 @@ #endregion using System; +using OpenRA.Mods.Common.Lint; using OpenRA.Mods.D2k.UtilityCommands; -using OpenRA.Traits; namespace OpenRA.Mods.D2k.Lint {