Last change
on this file since 330 was 326, checked in by alloc, 6 years ago |
More cleanup, allocation improvements
|
File size:
909 bytes
|
Line | |
---|
1 | using AllocsFixes.NetConnections.Servers.Web;
|
---|
2 | using AllocsFixes.NetConnections.Servers.Web.Handlers;
|
---|
3 |
|
---|
4 | namespace 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.Init ();
|
---|
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.