Basic framework - server loader, plugin manager, chat interface

This commit is contained in:
John Michael Gross
2016-09-16 19:57:18 -07:00
parent c0a41d6a67
commit f2ec79a286
35 changed files with 1758 additions and 22 deletions

43
PistonServer/Program.cs Normal file
View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
using Piston;
namespace PistonServer
{
public static class Program
{
public static MainWindow UserInterface = new MainWindow();
public static Dispatcher MainDispatcher { get; private set; }
[STAThread]
public static void Main(string[] args)
{
ServerManager.Static.RunArgs = new[] { "-console" };
MainDispatcher = Dispatcher.CurrentDispatcher;
Console.WriteLine(MainDispatcher.Thread.ManagedThreadId);
#if DEBUG
Directory.SetCurrentDirectory(@"C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\DedicatedServer64");
#endif
if (args.Contains("-nogui"))
ServerManager.Static.StartServer();
else
StartUI();
Dispatcher.Run();
}
public static void StartUI()
{
Thread.CurrentThread.Name = "UI Thread";
UserInterface.Show();
}
}
}