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

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

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

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