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