Fix NetworkManager, add more entity management, default command permission level to "Admin"

This commit is contained in:
John Gross
2017-06-02 19:40:52 -07:00
parent 8ad9ecf2bb
commit c40b17ac30
37 changed files with 489 additions and 114 deletions

View File

@@ -19,6 +19,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using Sandbox;
using Torch.API;
using VRageMath;
using Timer = System.Timers.Timer;
namespace Torch.Server
@@ -45,6 +46,11 @@ namespace Torch.Server
_startTime = DateTime.Now;
_uiUpdate.Elapsed += UiUpdate_Elapsed;
Left = _config.WindowPosition.X;
Top = _config.WindowPosition.Y;
Width = _config.WindowSize.X;
Height = _config.WindowSize.Y;
Chat.BindServer(server);
PlayerList.BindServer(server);
Plugins.BindServer(server);
@@ -101,6 +107,12 @@ namespace Torch.Server
protected override void OnClosing(CancelEventArgs e)
{
var newSize = new Vector2I((int)Width, (int)Height);
_config.WindowSize = newSize;
var newPos = new Vector2I((int)Left, (int)Top);
_config.WindowPosition = newPos;
_config.Save();
if (_server?.State == ServerState.Running)
_server.Stop();
}