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