Exemple #1
0
        public GameSettings(MainSettings mainSettings, string gametype)
        {
            ConfigPath = mainSettings.ConfigPath;
            GameType   = gametype;

            // Значения по умолчанию
            MaxRandomPlayers = new Dictionary <Team, int>()
            {
                { Team.Civil, 2 },
                { Team.Mafia, 1 },
                { Team.Neutral, 1 },
                { Team.Yakuza, 1 },
            };
            MuteOnDeath          = false;
            UseMuteBlacklist     = true;
            MinPlayers           = 6;
            MafPercent           = 34;
            StartFromNight       = true;
            PlayerCollectingTime = 60000;
            PauseTime            = 1000;
            MorningTime          = 2000;
            DayTime                 = 90000;
            EveningTime             = 30000;
            NightTime               = 90000;
            InfectionChancePercent  = 33;
            MaxInactiveDays         = 3;
            MaxUsersToNotify        = 50;
            MinNotificationInterval = 7200;
            ShowNightActions        = true;
            IsMafiaEnabled          = true;
            IsYakuzaEnabled         = false;

            ReadConfig();
            Validate();

            Points = Points.GetInstance(GetFilePath("points.xml"));
            Console.WriteLine("Points configuration successfully loaded");
            Roles = Roles.GetInstance(GetFilePath("roles.xml"));
            Console.WriteLine("Role configuration successfully loaded");
        }
Exemple #2
0
 public MessageBuilder(MainSettings settings, DiscordSocketClient client, IList <InGamePlayerInfo> playersList)
 {
     this.Language     = settings.Language;
     this.Client       = client;
     this._playersList = playersList;
 }