Ignore:
Timestamp:
Sep 3, 2018, 7:11:10 PM (6 years ago)
Author:
alloc
Message:

A17 compatibility changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/src/API.cs

    r267 r324  
    11using System;
     2using System.Collections.Generic;
    23
    34namespace AllocsFixes
    45{
    5         public class API : ModApiAbstract {
     6        public class API : IModApi {
    67
    7                 public override void GameAwake () {
     8                public void GameAwake () {
    89                        StateManager.Awake ();
    910                }
    1011
    11                 public override void GameShutdown () {
     12                public void GameShutdown () {
    1213                        StateManager.Shutdown ();
    1314                }
    1415               
    15                 public override void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
     16                public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
    1617                        PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile);
    1718                }
    1819
    19                 public override void PlayerLogin (ClientInfo _cInfo, string _compatibilityVersion) {
    20                 }
    21                
    22                 public override void PlayerSpawning (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {
     20                public void PlayerSpawning (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {
    2321                        AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile);
    2422                }
    2523               
    26                 public override void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
     24                public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
    2725                        AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown);
    2826                }
    2927
    30                 public override bool ChatMessage (ClientInfo _cInfo, EnumGameMessages _type, string _msg, string _mainName, bool _localizeMain, string _secondaryName, bool _localizeSecondary) {
     28                public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List<int> _recipientEntityIds) {
    3129                        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);
    3239                }
    3340        }
Note: See TracChangeset for help on using the changeset viewer.