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--;
                }
            }
        }
Example #2
0
 public LJEventHandler(LaterJoin plugin)
 {
     this.plugin = plugin;
 }