My New Year's resolution is to stop making commits like these

This commit is contained in:
John Gross
2017-01-01 16:37:30 -08:00
parent 81037b502a
commit 6e0922b805
33 changed files with 780 additions and 249 deletions

View File

@@ -15,7 +15,7 @@ using VRageRender;
namespace Torch.Client
{
class TorchClient : TorchBase, ITorchClient
public class TorchClient : TorchBase, ITorchClient
{
private MyCommonProgramStartup _startup;
private IMyRender _renderer;
@@ -24,6 +24,8 @@ namespace Torch.Client
public override void Init()
{
base.Init();
if (!File.Exists("steam_appid.txt"))
{
Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(VRage.FastResourceLock).Assembly.Location) + "\\..");
@@ -83,11 +85,18 @@ namespace Torch.Client
{
using (var spaceEngineersGame = new SpaceEngineersGame(_services, RunArgs))
{
Logger.Write("Starting client...");
Log.Write("Starting client...");
spaceEngineersGame.OnGameLoaded += SpaceEngineersGame_OnGameLoaded;
spaceEngineersGame.Run();
}
}
private void SpaceEngineersGame_OnGameLoaded(object sender, EventArgs e)
{
Log.Write("Loading plugins");
Plugins.LoadAllPlugins();
}
public override void Stop()
{
MySandboxGame.ExitThreadSafe();