| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 |
|
|---|
| 4 | namespace AllocsFixes
|
|---|
| 5 | {
|
|---|
| 6 | public class API : IModApi {
|
|---|
| 7 |
|
|---|
| 8 | public void GameAwake () {
|
|---|
| 9 | StateManager.Awake ();
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | public void GameShutdown () {
|
|---|
| 13 | StateManager.Shutdown ();
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
|
|---|
| 17 | PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile);
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 | public void PlayerSpawning (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {
|
|---|
| 21 | AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile);
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
|
|---|
| 25 | AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown);
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 | public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List<int> _recipientEntityIds) {
|
|---|
| 29 | return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName);
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | public void InitMod () {
|
|---|
| 33 | ModEvents.GameAwake.RegisterHandler (GameAwake);
|
|---|
| 34 | ModEvents.GameShutdown.RegisterHandler (GameShutdown);
|
|---|
| 35 | ModEvents.SavePlayerData.RegisterHandler (SavePlayerData);
|
|---|
| 36 | ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning);
|
|---|
| 37 | ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected);
|
|---|
| 38 | ModEvents.ChatMessage.RegisterHandler (ChatMessage);
|
|---|
| 39 | }
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|