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
RevLine 
[324]1using System.Collections.Generic;
[230]2
[325]3namespace AllocsFixes {
[324]4 public class API : IModApi {
[325]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 }
[230]13
[324]14 public void GameAwake () {
[230]15 StateManager.Awake ();
16 }
17
[324]18 public void GameShutdown () {
[230]19 StateManager.Shutdown ();
20 }
[325]21
[324]22 public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
[233]23 PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile);
[230]24 }
25
[324]26 public void PlayerSpawning (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {
[233]27 AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile);
[230]28 }
[325]29
[324]30 public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
[230]31 AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown);
32 }
33
[325]34 public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName,
35 bool _localizeMain, List<int> _recipientEntityIds) {
[267]36 return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName);
[238]37 }
[230]38 }
[325]39}
Note: See TracBrowser for help on using the repository browser.