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

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

Fixed game version compatibility of GamePrefs
Code style cleanup (mostly argument names)

File size: 798 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 () {
[351]23 MapRendering.MapRendering.Shutdown ();
[299]24 }
25
[324]26 private void CalcChunkColorsDone (Chunk _chunk) {
[351]27 MapRendering.MapRendering.RenderSingleChunk (_chunk);
[224]28 }
29 }
[325]30}
Note: See TracBrowser for help on using the repository browser.