Exemplo n.º 1
0
        private static CustomToggleOption MakeRoleToggle(string Id, string Type,
                                                         Dictionary <string, Func <string> > Arguments, OptionGroup Group)
        {
            var Result = CustomOption.AddToggle($"er.{Id}.{Type}",
                                                $"er.role.{Type}", false);

            Result.LocalizationArguments = Arguments;
            Result.Group = Group;
            return(Result);
        }
Exemplo n.º 2
0
        public void CreateOptions()
        {
            CustomOption.AddHeader(Properties.Resources.HunterOptions);
            HunterSpawnChance  = CustomOption.AddNumber("hunter-spawn-chance", Properties.Resources.SpawnChance, saveValue: true, 100, 0, 100, 10);
            HunterKillCooldown = CustomOption.AddNumber("hunter-kill-cooldown", Properties.Resources.HunterKillCooldown, saveValue: true, 30, 10, 60, 2.5f);

            CustomOption.AddHeader(Properties.Resources.EngineerOptions);
            EngineerSpawnChance = CustomOption.AddNumber("engineer-spawn-chance", Properties.Resources.SpawnChance, saveValue: true, 80, 0, 100, 10);

            CustomOption.AddHeader(Properties.Resources.ShapeShifterOptions);
            ShapeShifterSpawnChance    = CustomOption.AddNumber("shape-shifter-spawn-chance", Properties.Resources.SpawnChance, saveValue: true, 80, 0, 100, 10);
            ShapeShifterSampleCooldown = CustomOption.AddNumber("shape-shifter-sample-cooldown", Properties.Resources.ShapeShifterSampleCooldown, saveValue: true, 0, 0, 30, 2.5f);
            ShapeShifterMorphCooldown  = CustomOption.AddNumber("shape-shifter-morph-cooldown", Properties.Resources.ShapeShifterMorphCooldown, saveValue: true, 20, 0, 30, 2.5f);
            ShapeShifterMorphDuration  = CustomOption.AddNumber("shape-shifter-morph-duration", Properties.Resources.ShapeShifterMorphDuration, saveValue: true, 10, 0, 30, 2.5f);

            CustomOption.AddHeader(Properties.Resources.JesterOptions);
            JesterSpawnChance = CustomOption.AddNumber("jester-spawn-chance", Properties.Resources.SpawnChance, saveValue: true, 80, 0, 100, 10);

            CustomOption.AddHeader(Properties.Resources.DetectiveOptions);
            DetectiveSpawnChance = CustomOption.AddNumber("detective-spawn-chance", Properties.Resources.SpawnChance, saveValue: true, 80, 0, 100, 10);
            DetectiveShieldedPlayerSeesShield = CustomOption.AddToggle("detective-shielded-player-sees-shield", Properties.Resources.ShieldedPlayerSeesShield, saveValue: true, true);
            //DetectiveDeathReportThreshold = CustomOption.AddNumber("detective-death-report-threshold", Properties.Resources.DetectiveDeathReportThreshold, saveValue: true, 20, 0, 30, 2.5f);
        }
Exemplo n.º 3
0
 protected CustomToggleOption MakeToggle(string Name, bool Value)
 {
     return(CustomOption.AddToggle(MakeOptionId(Name), Value));
 }
Exemplo n.º 4
0
 private static KeyValuePair <CustomOption, Type> CreateToggleRoleOption <TRole>(string name, bool value)
     where TRole : RoleGeneric <TRole>, new()
 {
     return(new KeyValuePair <CustomOption, Type>(
                CustomOption.AddToggle(Role.GetName <TRole>() + ": " + name, value), typeof(TRole)));
 }