Add GitHub plugin updater, refactor game update hook to TorchBase instead of PluginManager, fix world config not applying
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user