Move launchPath argument from ExternalMods ctor to .Register.

This commit is contained in:
Paul Chote
2017-06-27 18:16:00 +00:00
committed by reaperrr
parent daf8f8d956
commit b30cfe4ada
2 changed files with 17 additions and 11 deletions

View File

@@ -38,15 +38,9 @@ namespace OpenRA
{
readonly Dictionary<string, ExternalMod> mods = new Dictionary<string, ExternalMod>();
readonly SheetBuilder sheetBuilder;
readonly string launchPath;
public ExternalMods(string launchPath)
public ExternalMods()
{
// Process.Start requires paths to not be quoted, even if they contain spaces
if (launchPath.First() == '"' && launchPath.Last() == '"')
launchPath = launchPath.Substring(1, launchPath.Length - 2);
this.launchPath = launchPath;
sheetBuilder = new SheetBuilder(SheetType.BGRA, 256);
// Load registered mods
@@ -83,7 +77,7 @@ namespace OpenRA
mods[ExternalMod.MakeKey(mod)] = mod;
}
internal void Register(Manifest mod)
internal void Register(Manifest mod, string launchPath)
{
if (mod.Metadata.Hidden)
return;