protected override void Init() { Settings = TMSPSCorePluginSettings.ReadFromFile(PluginSettingsFilePath); HelpSettings = Core.HelpSettings.ReadFromFile(Path.Combine(PluginDirectory, "HelpTemplate.xml")); HelpListActions = new PagedDialogActions(ID, (byte)Area.HelpList); NicknameResolverFactory.CreateSingleInstance(Settings, Context); List <PlayerInfo> players = GetPlayerList(); foreach (PlayerInfo playerInfo in players) { NicknameResolverFactory.Instance.Set(playerInfo.Login, playerInfo.NickName); } GetCurrentChallengeInfo(); // cache the current challenge info GetServerOptions(); // cache currenr server options GetCurrentGameMode(); // cache current game mode if (Settings.EnableDedimaniaBlackListSync) { DedimaniaBlackListSyncTimer = new Timer(SyncBlackListWithDedimania, null, TimeSpan.Zero, Settings.DedimaniaBlackListSyncInterval); } Context.RPCClient.Callbacks.PlayerConnect += Callbacks_PlayerConnect; Context.RPCClient.Callbacks.PlayerDisconnect += Callbacks_PlayerDisconnect; Context.RPCClient.Callbacks.BeginChallenge += Callbacks_BeginChallenge; Context.RPCClient.Callbacks.PlayerChat += Callbacks_PlayerChat; Context.RPCClient.Callbacks.EndRace += Callbacks_EndRace; Context.RPCClient.Callbacks.PlayerInfoChanged += Callbacks_PlayerInfoChanged; }
protected override void Init() { TopSumsActions = new PagedDialogActions(ID, (byte)Area.TopSums); TopSumsSettings = PagedUIDialogSettingsBase <PagedUIDialogSettings> .ReadFromFile(Path.Combine(PluginDirectory, "TopRecordsTemplate.xml")); Context.RPCClient.Callbacks.PlayerChat += Callbacks_PlayerChat; }
protected override void Init() { SendToAllLogins(); GuestListSettings = PagedUIDialogSettingsBase <PagedUIDialogSettings> .ReadFromFile(Path.Combine(PluginDirectory, "GuestListUITemplate.xml")); GuestListActions = new PagedDialogActions(ID, (byte)Area.GuestListArea); IgnoreListSettings = PagedUIDialogSettingsBase <PagedUIDialogSettings> .ReadFromFile(Path.Combine(PluginDirectory, "IgnoreListUITemplate.xml")); IgnoreListActions = new PagedDialogActions(ID, (byte)Area.IgnoreListArea); BanListSettings = PagedUIDialogSettingsBase <PagedUIDialogSettings> .ReadFromFile(Path.Combine(PluginDirectory, "BanListUITemplate.xml")); BanListActions = new PagedDialogActions(ID, (byte)Area.BanListArea); BlackListSettings = PagedUIDialogSettingsBase <PagedUIDialogSettings> .ReadFromFile(Path.Combine(PluginDirectory, "BlackListUITemplate.xml")); BlackListActions = new PagedDialogActions(ID, (byte)Area.BlackListArea); LivePlayerSettings = LivePlayerUIDialogSettings.ReadFromFile(Path.Combine(PluginDirectory, "LivePlayerUITemplate.xml")); LivePlayerActions = new PagedDialogActions(ID, (byte)Area.LivePlayersArea); Context.RPCClient.Callbacks.PlayerConnect += Callbacks_PlayerConnect; }