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

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

Fixed folders for A17 with persistent data and web map

File size: 822 bytes
RevLine 
[325]1using AllocsFixes.NetConnections.Servers.Web;
2using AllocsFixes.NetConnections.Servers.Web.Handlers;
[224]3
[331]4namespace AllocsFixes {
[324]5 public class API : IModApi {
[325]6 public void InitMod () {
7 ModEvents.GameStartDone.RegisterHandler (GameStartDone);
8 ModEvents.GameShutdown.RegisterHandler (GameShutdown);
9 ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
10 }
11
[337]12 private void GameStartDone () {
[324]13 // ReSharper disable once ObjectCreationAsStatement
[325]14 new Web ();
[326]15 LogBuffer.Init ();
[224]16
[325]17 if (ItemIconHandler.Instance != null) {
18 ItemIconHandler.Instance.LoadIcons ();
[291]19 }
20 }
[267]21
[324]22 private void GameShutdown () {
[299]23 AllocsFixes.MapRendering.MapRendering.Shutdown ();
24 }
25
[324]26 private void CalcChunkColorsDone (Chunk _chunk) {
[224]27 AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk);
28 }
29 }
[325]30}
Note: See TracBrowser for help on using the repository browser.