Fix editor conversion

This commit is contained in:
Paul Chote
2011-02-11 10:37:58 +13:00
parent 6ef330c357
commit 7332c5a6df
2 changed files with 4 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ using System.Globalization;
using System.Windows.Forms; using System.Windows.Forms;
using System.Linq; using System.Linq;
using System.IO; using System.IO;
using OpenRA.FileFormats;
namespace OpenRA.Editor namespace OpenRA.Editor
{ {
@@ -24,6 +25,7 @@ namespace OpenRA.Editor
if (args.Length >= 2 && args[0] == "--convert") if (args.Length >= 2 && args[0] == "--convert")
{ {
Game.modData = new ModData(args[1]); Game.modData = new ModData(args[1]);
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map()); Rules.LoadRules(Game.modData.Manifest, new Map());
UpgradeMaps(args[1]); UpgradeMaps(args[1]);
return; return;
@@ -44,7 +46,7 @@ namespace OpenRA.Editor
foreach (var path in ModData.FindMapsIn(MapFolderPath)) foreach (var path in ModData.FindMapsIn(MapFolderPath))
{ {
var map = new Map(path); var map = new Map(path);
map.Save(path+".oramap"); map.Save(path);
} }
} }

View File

@@ -211,7 +211,7 @@ namespace OpenRA
public static Dictionary<String, Mod> CurrentMods public static Dictionary<String, Mod> CurrentMods
{ {
get { return Mod.AllMods.Where( k => orderManager.LobbyInfo.GlobalSettings.Mods.Contains( k.Key )).ToDictionary( k => k.Key, k => k.Value ); } get { return Mod.AllMods.Where( k => modData.Manifest.Mods.Contains( k.Key )).ToDictionary( k => k.Key, k => k.Value ); }
} }
static Modifiers modifiers; static Modifiers modifiers;