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

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

A11 preps

File size: 896 bytes
RevLine 
[182]1using AllocsFixes.NetConnections.Servers.Telnet;
[142]2using System;
[182]3using System.Reflection;
[142]4
5namespace AllocsFixes
6{
7 public class StateManager
8 {
9 public static void Awake (GameManager manager)
10 {
11 try {
[182]12 Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
[224]13
14 Mods.LoadMods ();
15 Mods.CallGameAwake ();
16 CommandExtensions.InitCommandExtensions (manager);
17
[197]18 new Telnet ();
[182]19
[197]20 ItemList.Instance.Init ();
[182]21
[142]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 {
[145]31 Log.Out ("Server shutting down!");
[224]32 Mods.CallGameShutdown ();
[142]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.