Changeset 325 for binary-improvements/MapRendering/API.cs
- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/API.cs
r324 r325 1 using System; 1 using AllocsFixes.NetConnections.Servers.Web; 2 using AllocsFixes.NetConnections.Servers.Web.Handlers; 2 3 3 namespace MapRendering 4 { 4 namespace MapRendering { 5 5 public class API : IModApi { 6 public void InitMod () { 7 ModEvents.GameAwake.RegisterHandler (GameAwake); 8 ModEvents.GameStartDone.RegisterHandler (GameStartDone); 9 ModEvents.GameShutdown.RegisterHandler (GameShutdown); 10 ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone); 11 } 12 6 13 private void GameAwake () { 7 14 // ReSharper disable once ObjectCreationAsStatement 8 new AllocsFixes.NetConnections.Servers.Web.Web ();9 AllocsFixes.NetConnections.Servers.Web.LogBuffer.Instance.GetType ();15 new Web (); 16 LogBuffer.Instance.GetType (); 10 17 } 11 18 12 19 private void GameStartDone () { 13 if ( AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance != null) {14 AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance.LoadIcons ();20 if (ItemIconHandler.Instance != null) { 21 ItemIconHandler.Instance.LoadIcons (); 15 22 } 16 23 } … … 23 30 AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk); 24 31 } 25 26 public void InitMod () {27 ModEvents.GameAwake.RegisterHandler (GameAwake);28 ModEvents.GameStartDone.RegisterHandler (GameStartDone);29 ModEvents.GameShutdown.RegisterHandler (GameShutdown);30 ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);31 }32 32 } 33 33 } 34
Note:
See TracChangeset
for help on using the changeset viewer.