source: binary-improvements/MapRendering/API.cs@ 324

Last change on this file since 324 was 324, checked in by alloc, 6 years ago

A17 compatibility changes

File size: 1010 bytes
Line 
1using System;
2
3namespace MapRendering
4{
5 public class API : IModApi {
6 private void GameAwake () {
7 // ReSharper disable once ObjectCreationAsStatement
8 new AllocsFixes.NetConnections.Servers.Web.Web ();
9 AllocsFixes.NetConnections.Servers.Web.LogBuffer.Instance.GetType ();
10 }
11
12 private void GameStartDone () {
13 if (AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance != null) {
14 AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance.LoadIcons ();
15 }
16 }
17
18 private void GameShutdown () {
19 AllocsFixes.MapRendering.MapRendering.Shutdown ();
20 }
21
22 private void CalcChunkColorsDone (Chunk _chunk) {
23 AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk);
24 }
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 }
33}
34
Note: See TracBrowser for help on using the repository browser.