Merge pull request #6872 from Mailaender/check-map-rules

Fixed Fort Lonestar and Drop Zone maps and added a test to check map rule loading
This commit is contained in:
Paul Chote
2014-11-11 08:35:56 +13:00
7 changed files with 57 additions and 74 deletions

View File

@@ -0,0 +1,31 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 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. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA.Traits;
namespace OpenRA.Mods.RA
{
public class CheckMapRules : ILintPass
{
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
try
{
Game.modData.RulesetCache.LoadMapRules(map);
}
catch (Exception e)
{
emitError(e.Message);
}
}
}
}

View File

@@ -494,6 +494,7 @@
<Compile Include="UtilityCommands\ActorStatsExport.cs" />
<Compile Include="UtilityCommands\ExportCharacterSeparatedRules.cs" />
<Compile Include="UtilityCommands\Extensions.cs" />
<Compile Include="Lint\CheckMapRules.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">