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

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

Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)

File size: 921 bytes
Line 
1using AllocsFixes.NetConnections.Servers.Web;
2using AllocsFixes.NetConnections.Servers.Web.Handlers;
3
4namespace MapRendering {
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
13 private void GameAwake () {
14 // ReSharper disable once ObjectCreationAsStatement
15 new Web ();
16 LogBuffer.Instance.GetType ();
17 }
18
19 private void GameStartDone () {
20 if (ItemIconHandler.Instance != null) {
21 ItemIconHandler.Instance.LoadIcons ();
22 }
23 }
24
25 private void GameShutdown () {
26 AllocsFixes.MapRendering.MapRendering.Shutdown ();
27 }
28
29 private void CalcChunkColorsDone (Chunk _chunk) {
30 AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk);
31 }
32 }
33}
Note: See TracBrowser for help on using the repository browser.