Add GitHub plugin updater, refactor game update hook to TorchBase instead of PluginManager, fix world config not applying

This commit is contained in:
John Gross
2017-04-29 13:28:24 -07:00
parent 03a22851af
commit 135d1f4be8
28 changed files with 419 additions and 189 deletions

View File

@@ -40,7 +40,7 @@ namespace Torch.Server
return;
}
var configName = args.FirstOrDefault() ?? "TorchConfig.xml";
var configName = /*args.FirstOrDefault() ??*/ "TorchConfig.xml";
var configPath = Path.Combine(Directory.GetCurrentDirectory(), configName);
TorchConfig options;
if (File.Exists(configName))
@@ -55,6 +55,20 @@ namespace Torch.Server
options.Save(configPath);
}
bool gui = true;
foreach (var arg in args)
{
switch (arg)
{
case "-noupdate":
options.EnableAutomaticUpdates = false;
break;
case "-nogui":
gui = false;
break;
}
}
/*
if (!parser.ParseArguments(args, options))
{
@@ -118,9 +132,16 @@ namespace Torch.Server
_server = new TorchServer(options);
_server.Init();
var ui = new TorchUI((TorchServer)_server);
ui.LoadConfig(options);
ui.ShowDialog();
if (gui)
{
var ui = new TorchUI((TorchServer)_server);
ui.LoadConfig(options);
ui.ShowDialog();
}
else
{
_server.Start();
}
}
}
}