don't load mjolnir on startup; and use the mod specified on the commandline
This commit is contained in:
@@ -13,13 +13,22 @@ namespace OpenRA.Editor
|
|||||||
{
|
{
|
||||||
public partial class Form1 : Form
|
public partial class Form1 : Form
|
||||||
{
|
{
|
||||||
public Form1()
|
public Form1(string[] mods)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
||||||
LocateGameRoot();
|
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;
|
string loadedMapName;
|
||||||
@@ -36,9 +45,7 @@ namespace OpenRA.Editor
|
|||||||
currentMod = mod;
|
currentMod = mod;
|
||||||
loadedMapName = mapname;
|
loadedMapName = mapname;
|
||||||
|
|
||||||
var mods = new[] { mod };
|
var manifest = new Manifest(new[] { currentMod });
|
||||||
|
|
||||||
var manifest = new Manifest(mods);
|
|
||||||
Game.LoadModAssemblies(manifest);
|
Game.LoadModAssemblies(manifest);
|
||||||
|
|
||||||
FileSystem.UnmountAll();
|
FileSystem.UnmountAll();
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ namespace OpenRA.Editor
|
|||||||
/// The main entry point for the application.
|
/// The main entry point for the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main( string[] args )
|
||||||
{
|
{
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new Form1());
|
Application.Run(new Form1(args));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user