Example #1
0
        public async ValueTask OnGameCreated(IGameCreatedEvent e)
        {
            var options = e.Game.Options;

            options.MaxPlayers   = 30;
            options.NumImpostors = 9;
            await e.Game.SyncSettingsAsync();
        }
        public void OnGameCreated(IGameCreatedEvent e)
        {
            DetectiveGame game = new DetectiveGame {
                Kills                 = new Dictionary <IInnerPlayerControl, IInnerPlayerControl>(),
                DetectiveClientId     = -1,
                Enabled               = true,
                RandomDetectiveOutfit = false
            };

            _games.Add(e.Game.Code, game);
        }
Example #3
0
        public void OnGameCreated(IGameCreatedEvent e)
        {
            JesterGame jgame = new JesterGame();

            jgame.JesterOn     = true;
            jgame.Jesterwin    = false;
            jgame.GameEnded    = false;
            jgame.CountingDown = false;
            jgame.JesterInGame = false;
            JesterGames.Add(e.Game.Code, jgame);
        }
 public void OnGameCreated(IGameCreatedEvent e)
 {
     Task.Run(async() =>
     {
         await Task.Delay(IPFilterSettings.IPCheckDelay * 1000);
         var clientIp = e.Game.Host.Client.Connection.EndPoint.Address.ToString();
         if (IsClientBlockedFromCreatingLobbies(clientIp))
         {
             _logger.LogInformation($"Player {e.Game.Host.Character.PlayerInfo.PlayerName} with IP: {e.Game.Host.Client.Connection.EndPoint.Address} tried to create a game lobby");
             await e.Game.Host.Client.DisconnectAsync(DisconnectReason.Custom, IPFilterSettings.BlockedMessage);
         }
     });
 }
        public async void OnGameCreated(IGameCreatedEvent evt)
        {
            var code = evt.Game.Code;

            logger.LogInformation($"[{code}] Game created, preparing voice channel.");

            // TODO do not login every time a game is created
            var login = new Login {
                ServerId = config.ServerId, Username = config.Username, Password = config.Password
            };

            executor.Schedule(login);

            var create = new CreateChannel {
                ChannelOrder = config.ChannelOrder, ChannelName = $"Impostor {code}"
            };
            var id = await executor.Schedule(create);

            logger.LogInformation($"[{code}] Voice channel created: id={id}");
        }
Example #6
0
 public void OnGameCreated(IGameCreatedEvent e)
 {
     Console.WriteLine("Game > created");
 }
 public void OnGameCreated(IGameCreatedEvent evt) => GameCreated?.Invoke(evt);
 public void OnGameCreated(IGameCreatedEvent e)
 {
     _susSuiteManager.PluginManager.CreateGame(e.Game.Code);
 }
Example #9
0
 public void OnGameCreated(IGameCreatedEvent e)
 {
     _automuteService.Games.TryAdd(e.Game.Code.Code, e.Game);
 }
Example #10
0
 public void OnGameCreated(IGameCreatedEvent e)
 {
     _logger.LogInformation("Game {code} > created", e.Game.Code);
 }
Example #11
0
 public void OnGameCreated(IGameCreatedEvent e)
 {
     Bot.games.Add(e.Game.Code.Code, new Game {
         DeadŠ”anTalkDuringTasks = Bot.config.DeadŠ”anTalkDuringTasks
     });
 }
Example #12
0
 public void OnGameCreated(IGameCreatedEvent e)
 {
     _activeGameModes[e.Game.Code] = _normalMode;
 }
Example #13
0
 public void OnGameCreated(IGameCreatedEvent evt)
 {
     OnLobbyCreated?.Invoke(evt);
 }
Example #14
0
 public void OnGameCreated(IGameCreatedEvent evt)
 {
     Interlocked.Increment(ref OnGameCreatedCount);
 }
 public void OnGameCreated(IGameCreatedEvent e)
 {
     _logger.LogInformation("Game > created");
 }