Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace MapRendering
|
---|
| 4 | {
|
---|
[324] | 5 | public class API : IModApi {
|
---|
| 6 | private void GameAwake () {
|
---|
| 7 | // ReSharper disable once ObjectCreationAsStatement
|
---|
[230] | 8 | new AllocsFixes.NetConnections.Servers.Web.Web ();
|
---|
[250] | 9 | AllocsFixes.NetConnections.Servers.Web.LogBuffer.Instance.GetType ();
|
---|
[224] | 10 | }
|
---|
| 11 |
|
---|
[324] | 12 | private void GameStartDone () {
|
---|
[291] | 13 | if (AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance != null) {
|
---|
| 14 | AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance.LoadIcons ();
|
---|
| 15 | }
|
---|
| 16 | }
|
---|
[267] | 17 |
|
---|
[324] | 18 | private void GameShutdown () {
|
---|
[299] | 19 | AllocsFixes.MapRendering.MapRendering.Shutdown ();
|
---|
| 20 | }
|
---|
| 21 |
|
---|
[324] | 22 | private void CalcChunkColorsDone (Chunk _chunk) {
|
---|
[224] | 23 | AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk);
|
---|
| 24 | }
|
---|
[230] | 25 |
|
---|
[324] | 26 | public void InitMod () {
|
---|
| 27 | ModEvents.GameAwake.RegisterHandler (GameAwake);
|
---|
| 28 | ModEvents.GameStartDone.RegisterHandler (GameStartDone);
|
---|
| 29 | ModEvents.GameShutdown.RegisterHandler (GameShutdown);
|
---|
| 30 | ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);
|
---|
| 31 | }
|
---|
[224] | 32 | }
|
---|
| 33 | }
|
---|
| 34 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.