source: binary-improvements/7dtd-server-fixes/src/StateManager.cs@ 192

Last change on this file since 192 was 182, checked in by alloc, 10 years ago

fixes

File size: 844 bytes
RevLine 
[182]1using AllocsFixes.NetConnections.Servers.Telnet;
2using AllocsFixes.NetConnections.Servers.Web;
[142]3using System;
[182]4using System.Reflection;
[142]5
6namespace AllocsFixes
7{
8 public class StateManager
9 {
10 public static void Awake (GameManager manager)
11 {
12 try {
[182]13 Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
14 new Web();
15 new Telnet();
16
[142]17 CommandExtensions.InitCommandExtensions (manager);
[182]18
[142]19 PersistentData.PersistentContainer.Load ();
20 } catch (Exception e) {
21 Log.Out ("Error in StateManager.Awake: " + e);
22 }
23 }
24
25 public static void Shutdown (GameManager manager)
26 {
27 try {
[145]28 Log.Out ("Server shutting down!");
[142]29 PersistentData.PersistentContainer.Instance.Save ();
30 } catch (Exception e) {
31 Log.Out ("Error in StateManager.Shutdown: " + e);
32 }
33 }
34 }
35}
36
Note: See TracBrowser for help on using the repository browser.