public override void Register()
        {
            this.ljEventHandler = new LJEventHandler(this);
            this.AddEventHandlers(this.ljEventHandler);

            this.AddConfig(new Smod2.Config.ConfigSetting("sf_lj_disable", false, true, "Disables Second_Fry's Later Join"));
            this.AddConfig(new Smod2.Config.ConfigSetting("sf_lj_time", 120, true, "Amount of time for player to join and still spawn after round start"));
            this.AddConfig(new Smod2.Config.ConfigSetting("sf_lj_explore", false, true, "Allows player to explore the map before game start"));

            this.AddCommand("sf_lj_disable", new DisableCommand(this));
            this.AddCommand("sf_lj_enable", new EnableCommand(this));
            this.AddCommand("sf_lj_reload", new ReloadCommand(this));
        }
示例#2
0
        public Role SelectRole()
        {
            Smod2.API.Team team = this.RollTeam();
            Role           role = LJEventHandler.GetClassID(team, this.scpsToSpawn);

            role = this.MutateRoleByAvailability(role);
            int i = 0;

            while (role == Role.UNASSIGNED && i < 5)
            {
                team = this.RollTeam();
                role = LJEventHandler.GetClassID(team, this.scpsToSpawn);
                role = this.MutateRoleByAvailability(role);
                i++;
            }

            return(role);
        }