Merge pull request #7439 from ScottNZ/fix-map-import

Fix map importer using the map title as the output filename.
This commit is contained in:
Igor Popov
2015-02-17 09:47:01 +03:00

View File

@@ -9,9 +9,7 @@
#endregion #endregion
using System; using System;
using System.Collections.Generic; using System.IO;
using System.Linq;
using System.Text;
namespace OpenRA.Mods.Common.UtilityCommands namespace OpenRA.Mods.Common.UtilityCommands
{ {
@@ -27,7 +25,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
var rules = Game.ModData.RulesetCache.LoadDefaultRules(); var rules = Game.ModData.RulesetCache.LoadDefaultRules();
var map = LegacyMapImporter.Import(args[1], modData.Manifest.Mod.Id, rules, e => Console.WriteLine(e)); var map = LegacyMapImporter.Import(args[1], modData.Manifest.Mod.Id, rules, e => Console.WriteLine(e));
var dest = map.Title + ".oramap"; var dest = Path.ChangeExtension(args[1], "oramap");
map.Save(dest); map.Save(dest);
Console.WriteLine(dest + " saved."); Console.WriteLine(dest + " saved.");
} }