refactoring and proper game state destruction

This commit is contained in:
zznty
2024-05-15 20:59:30 +07:00
parent bfa3604524
commit 46ee2b61a5
191 changed files with 204 additions and 2108 deletions

View File

@@ -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();
}
}
}