Move map format upgrades to an explicit upgrade rule.

This commit is contained in:
Paul Chote
2016-02-06 14:04:02 +00:00
parent e4867ad18a
commit 34910cd128
5 changed files with 114 additions and 81 deletions

View File

@@ -17,9 +17,9 @@ namespace OpenRA.Mods.Common.Lint
{
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
{
if (map.MapFormat < Map.MinimumSupportedMapFormat)
emitError("Map format {0} is older than the minimum supported version {1}."
.F(map.MapFormat, Map.MinimumSupportedMapFormat));
if (map.MapFormat != Map.SupportedMapFormat)
emitError("Map format {0} does not match the supported version {1}."
.F(map.MapFormat, Map.SupportedMapFormat));
if (map.Author == null)
emitError("Map does not define a valid author.");