refactoring and proper game state destruction
This commit is contained in:
@@ -1,26 +1,11 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
using NLog;
|
||||
using NLog.Targets.Wrappers;
|
||||
using Sandbox;
|
||||
using Torch.API;
|
||||
using Torch.API.Managers;
|
||||
using Torch.Server.Managers;
|
||||
using Torch.Server.ViewModels;
|
||||
using Torch.Server.Views;
|
||||
using MessageBoxResult = System.Windows.MessageBoxResult;
|
||||
@@ -113,10 +98,10 @@ namespace Torch.Server
|
||||
|
||||
//_config.Save(); //you idiot
|
||||
|
||||
if (_server?.State == ServerState.Running)
|
||||
if (_server.CurrentSession is not null)
|
||||
_server.Stop();
|
||||
|
||||
Environment.Exit(0);
|
||||
|
||||
_server.Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user