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

Last change on this file since 225 was 224, checked in by alloc, 10 years ago

A11 preps

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