Beispiel #1
0
        private int RollTeamFiller()
        {
            IConfigFile config = ConfigManager.Manager.Config;
            int         teamID = config.GetIntValue("filler_team_id", (int)Smod2.API.Team.CLASSD);

            return(teamID);
        }
        private void PopulateEnabledSCPs()
        {
            string[] prefixes =
            {
                "scp049",
                "scp079",
                "scp096",
                "scp106",
                "scp173",
                "scp939_53",
                "scp939_89"
            };
            IConfigFile config = ConfigManager.Manager.Config;

            foreach (string prefix in prefixes)
            {
                bool isDisabled = config.GetBoolValue(prefix + "_disable", false);
                if (isDisabled)
                {
                    continue;
                }

                Role role = LaterJoin.ConvertSCPPrefixToRoleID(prefix);
                if (role == Role.UNASSIGNED)
                {
                    this.Error("Trying to convert unknown prefix: " + prefix);
                    continue;
                }

                int amount = config.GetIntValue(prefix + "_amount", 1);
                while (amount > 0)
                {
                    this.enabledSCPs.Add(role);
                    amount--;
                }
            }
        }