don't load mjolnir on startup; and use the mod specified on the commandline

This commit is contained in:
Chris Forbes
2010-05-10 21:02:06 +12:00
parent de59ce1091
commit 1483addb99
2 changed files with 14 additions and 7 deletions

View File

@@ -13,13 +13,22 @@ namespace OpenRA.Editor
{
public partial class Form1 : Form
{
public Form1()
public Form1(string[] mods)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
LocateGameRoot();
LoadMap(currentMod, "mjolnir");
currentMod = mods.FirstOrDefault() ?? "ra";
var manifest = new Manifest(new[] { currentMod });
Game.LoadModAssemblies(manifest);
FileSystem.UnmountAll();
foreach (var folder in manifest.Folders) FileSystem.Mount(folder);
foreach (var pkg in manifest.Packages) FileSystem.Mount(pkg);
Rules.LoadRules(manifest, new Map());
}
string loadedMapName;
@@ -36,9 +45,7 @@ namespace OpenRA.Editor
currentMod = mod;
loadedMapName = mapname;
var mods = new[] { mod };
var manifest = new Manifest(mods);
var manifest = new Manifest(new[] { currentMod });
Game.LoadModAssemblies(manifest);
FileSystem.UnmountAll();