source: binary-improvements/7dtd-server-fixes/src/API.cs@ 324

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

A17 compatibility changes

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3
4namespace 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
Note: See TracBrowser for help on using the repository browser.