From 14deb1efdf6633e7a47ec6076f32aeeb2bb21745 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 15 Dec 2014 17:30:44 +1300 Subject: [PATCH] Drop support for map format 5. --- OpenRA.Game/Map/Map.cs | 22 +++------------------- OpenRA.Game/Map/MapCache.cs | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/OpenRA.Game/Map/Map.cs b/OpenRA.Game/Map/Map.cs index c065d6a657..18e13492e5 100644 --- a/OpenRA.Game/Map/Map.cs +++ b/OpenRA.Game/Map/Map.cs @@ -242,11 +242,7 @@ namespace OpenRA public Map() { } // The standard constructor for most purposes - public Map(string path) : this(path, null) { } - - // Support upgrading format 5 maps to a more - // recent version by defining upgradeForMod. - public Map(string path, string upgradeForMod) + public Map(string path) { Path = path; Container = GlobalFileSystem.OpenPackage(path, null, int.MaxValue); @@ -260,22 +256,10 @@ namespace OpenRA // Support for formats 1-3 dropped 2011-02-11. // Use release-20110207 to convert older maps to format 4 // Use release-20110511 to convert older maps to format 5 - if (MapFormat < 5) + // Use release-20141029 to convert older maps to format 6 + if (MapFormat < 6) throw new InvalidDataException("Map format {0} is not supported.\n File: {1}".F(MapFormat, path)); - // Format 5 -> 6 enforces the use of RequiresMod - if (MapFormat == 5) - { - if (upgradeForMod == null) - throw new InvalidDataException("Map format {0} is not supported, but can be upgraded.\n File: {1}".F(MapFormat, path)); - - Console.WriteLine("Upgrading {0} from Format 5 to Format 6", path); - - // TODO: This isn't very nice, but there is no other consistent way - // of finding the mod early during the engine initialization. - RequiresMod = upgradeForMod; - } - var nd = yaml.ToDictionary(); // Load players diff --git a/OpenRA.Game/Map/MapCache.cs b/OpenRA.Game/Map/MapCache.cs index 2621808439..b02adcdf8b 100644 --- a/OpenRA.Game/Map/MapCache.cs +++ b/OpenRA.Game/Map/MapCache.cs @@ -51,7 +51,7 @@ namespace OpenRA { using (new Support.PerfTimer(path.Key)) { - var map = new Map(path.Key, modData.Manifest.Mod.Id); + var map = new Map(path.Key); if (modData.Manifest.MapCompatibility.Contains(map.RequiresMod)) previews[map.Uid].UpdateFromMap(map, path.Value); }