Exemple #1
0
        /// <summary>
        /// End initialization
        /// </summary>
        protected override void OnBeforeInitialModuleScreenSetAsRoot()
        {
#if DEBUG
            var builder = new DefaultSettingsBuilder("Testing_Global_v1", "Testing Fluent Settings")
                          .SetFormat("xml")
                          .SetFolderName("")
                          .SetSubFolder("")
                          .CreateGroup("Testing 1", groupBuilder => groupBuilder
                                       .AddBool("Check Box", new ProxyRef <bool>(() => _boolValue, o => _boolValue = o), boolBuilder => boolBuilder
                                                .SetHintText("Test")))
                          .CreateGroup("Testing 2", groupBuilder => groupBuilder
                                       .AddInteger("Integer", 0, 10, new ProxyRef <int>(() => _intValue, o => _intValue = o), integerBuilder => integerBuilder
                                                   .SetHintText("Testing"))
                                       .AddFloatingInteger("Floating Integer", 0, 10, new ProxyRef <float>(() => _floatValue, o => _floatValue = o), floatingBuilder => floatingBuilder
                                                           .SetRequireRestart(true)
                                                           .SetHintText("Test")))
                          .CreateGroup("Testing 3", groupBuilder => groupBuilder
                                       .AddText("Test", new ProxyRef <string>(() => _stringValue, o => _stringValue = o), null));

            var globalSettings = builder.BuildAsGlobal();
            globalSettings.Register();
            //globalSettings.Unregister();

            //var perCharacterSettings = builder.BuildAsPerCharacter();
            //perCharacterSettings.Register();
            //perCharacterSettings.Unregister();
#endif
        }
Exemple #2
0
        /// <summary>
        /// End initialization
        /// </summary>
        protected override void OnBeforeInitialModuleScreenSetAsRoot()
        {
            var builder = new DefaultSettingsBuilder("Testing_Global_v3", "MCMv3 Testing Fluent Settings") !
                          .SetFormat("xml")
                          .SetFolderName(string.Empty)
                          .SetSubFolder(string.Empty)
                          .CreateGroup("Testing 1", groupBuilder => groupBuilder
                                       .AddBool("prop_1", "Check Box", new ProxyRef <bool>(() => _boolValue, o => _boolValue = o), boolBuilder => boolBuilder
                                                .SetHintText("Test")
                                                .SetRequireRestart(false)))
                          .CreateGroup("Testing 2", groupBuilder => groupBuilder
                                       .AddInteger("prop_2", "Integer", 0, 10, new ProxyRef <int>(() => _intValue, o => _intValue = o), integerBuilder => integerBuilder
                                                   .SetHintText("Testing"))
                                       .AddFloatingInteger("prop_3", "Floating Integer", 0, 10, new ProxyRef <float>(() => _floatValue, o => _floatValue = o), floatingBuilder => floatingBuilder
                                                           .SetRequireRestart(true)
                                                           .SetHintText("Test")))
                          .CreateGroup("Testing 3", groupBuilder => groupBuilder
                                       .AddText("prop_4", "Test", new ProxyRef <string>(() => _stringValue, o => _stringValue = o), null));

            var globalSettings = builder.BuildAsGlobal();

            globalSettings.Register();
            //globalSettings.Unregister();

            //var PerSaveSettings = builder.BuildAsPerSave();
            //PerSaveSettings.Register();
            //PerSaveSettings.Unregister();
        }
Exemple #3
0
        private CsSettings()
        {
            var builder = new DefaultSettingsBuilder("CsSettings", $"CustomSpawn{Main.version}")
                          .SetFormat("xml")
                          .SetFolderName("CustomSpawn")
                          .SetSubFolder("")
                          .CreateGroup("Suond", groupBuilder => groupBuilder.SetGroupOrder(1)
                                       .AddBool("notification_sound", "Spawn Notification Sound",
                                                new ProxyRef <bool>(() => SpawnSoundEnabled, o => SpawnSoundEnabled = o), boolBuilder =>
                                                boolBuilder.SetHintText("Enable a notification sound when an important party spawn")))
                          .CreateGroup("Debug", groupBuilder => groupBuilder.SetGroupOrder(2)
                                       .AddBool("isDebugMode", "Enable Debug", new ProxyRef <bool>(() => IsDebugMode, o => IsDebugMode = o), boolBuilder =>
                                                boolBuilder.SetHintText("Enable the debug mode"))
                                       .AddBool("showAIDebug", "Show AI Debug", new ProxyRef <bool>(() => ShowAIDebug, o => ShowAIDebug = o), boolBuilder =>
                                                boolBuilder.SetHintText("Show AI debug messages"))
                                       .AddBool("showDeathTrackDebug", "Show Death Track Debug", new ProxyRef <bool>(() => ShowDeathTrackDebug, o => ShowDeathTrackDebug = o), boolBuilder =>
                                                boolBuilder.SetHintText("Show messages related to party destruction"))
                                       .AddBool("isAllSpawnMode", "Is All Spawn Mode", new ProxyRef <bool>(() => IsAllSpawnMode, o => IsAllSpawnMode = o), boolBuilder =>
                                                boolBuilder.SetHintText("Enable the spawning of all party in one night"))
                                       .AddBool("spawnAtOneHideout", "Spawn At One Hideout", new ProxyRef <bool>(() => SpawnAtOneHideout, o => SpawnAtOneHideout = o), boolBuilder =>
                                                boolBuilder.SetHintText("Spawn player at one hideout"))
                                       .AddBool("modifyPartySpeeds", "Modify Party Speeds", new ProxyRef <bool>(() => ModifyPartySpeeds, o => ModifyPartySpeeds = o), boolBuilder =>
                                                boolBuilder.SetHintText("Modify the party speeds"))
                                       .AddBool("isRemovalMode", "Is Removal Mode", new ProxyRef <bool>(() => IsRemovalMode, o => IsRemovalMode = o), boolBuilder =>
                                                boolBuilder.SetHintText("Enable the removal mode"))
                                       .AddInteger("updatePartyRedundantDataPerHour", "Update Party Redundant Data Per Hour", 1, 5, new ProxyRef <int>(() => UpdatePartyRedundantDataPerHour, o => UpdatePartyRedundantDataPerHour = o), boolBuilder =>
                                                   boolBuilder.SetHintText("Do Something"))
                                       .AddInteger("sameErrorShowUntil", "Same Error Show Until", 1, 5, new ProxyRef <int>(() => SameErrorShowUntil, o => SameErrorShowUntil = o), boolBuilder =>
                                                   boolBuilder.SetHintText("The same error will be shown in the log if it exceeds this number in one play time"))
                                       );

            var globalSettings = builder.BuildAsGlobal();

            globalSettings.Register();
        }
Exemple #4
0
        public void RegisterSettings()
        {
            /*
             * var builder = new DefaultSettingsBuilder("Test_v1", "Test Mod")
             *  .SetFormat("json")
             *  .SetFolderName("Test Mod");
             *
             * builder.CreateGroup("Test Group Toggle", groupBuilder => groupBuilder
             *  .SetIsMainToggle(true)
             *  .AddFloatingInteger("float_id", "Float Display Name", 0f, 20f,
             *      new ProxyRef<float>(() => _testFloat, (value) => _testFloat = value),
             *      builder => builder.SetHintText("Float Hint")));
             *
             * _settings = builder.BuildAsGlobal();
             * _settings.Register();
             * }
             */


            int order   = 0;
            var builder = new DefaultSettingsBuilder(InstanceID, SubModule.ModName)
                          .SetFormat("xml")
                          .SetFolderName(SubModule.ModuleFolderName);


            // Training Perk Overrides Group
            builder.CreateGroup($"{Strings.TrainingPerkGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .SetIsMainToggle(true)
                                .AddBool(nameof(EnableTrainingPerkOverrides),
                                         Strings.TrainingPerkGroup,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(EnableTrainingPerkOverrides)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.EnableTrainingPerkOverridesHint))
                                );

            // Training Perk xp amounts
            builder.CreateGroup($"{Strings.TrainingPerkGroup}/{Strings.TrainingPerkXpGain}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddInteger(nameof(RaiseTheMeekXpAmount),
                                            Strings.RaiseTheMeekXpAmountDisplay, 0, 100,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(RaiseTheMeekXpAmount)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.RaiseTheMeekXpAmountHint))
                                .AddInteger(nameof(CombatTipsXpAmount),
                                            Strings.CombatTipsXpAmountDisplay, 0, 100,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(CombatTipsXpAmount)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.CombatTipsXpAmountHint))
                                );

            // Training Perk tier limits
            builder.CreateGroup($"{Strings.TrainingPerkGroup}/{Strings.TierLimitsSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddInteger(nameof(RaiseTheMeekMaxTierTrained),
                                            Strings.RaiseTheMeekMaxTierTrainedDisplay, 0, 20,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(RaiseTheMeekMaxTierTrained)), this),
                                            intBuilder => intBuilder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.RaiseTheMeekMaxTierTrainedHint))
                                .AddInteger(nameof(ComatTipsMaxTierTrained),
                                            Strings.CombatTipsMaxTierTrainedDisplay, 0, 20,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(ComatTipsMaxTierTrained)), this),
                                            intBuilder => intBuilder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.CombatTipsMaxTierTrainedHint))
                                );

            // Training Perk xp multipliers
            builder.CreateGroup($"{Strings.TrainingPerkGroup}" +
                                $"/{Strings.XpMultipliersSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddFloatingInteger(nameof(PlayerPartyTrainingXpMultiplier),
                                                    Strings.PlayerPartyTrainingMultDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerPartyTrainingXpMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerPartyTrainingMultHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(PlayerClanPartyTrainingXpMultiplier),
                                                    Strings.PlayerClanPartyTrainingMultDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerClanPartyTrainingXpMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerClanPartyTrainingMultHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(NonPlayerClanPartyTrainingXpMultiplier),
                                                    Strings.NonPlayerClanPartyTrainingMultDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(NonPlayerClanPartyTrainingXpMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.NonPlayerClanPartyTrainingMultHint)
                                                    .AddValueFormat("#0%"))
                                );

            // Training Perk General
            builder.CreateGroup($"{Strings.TrainingPerkGroup}" +
                                $"/{Strings.GeneralSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddFloatingInteger(nameof(LevelDifferenceFactor),
                                                    Strings.LevelDifferenceFactorDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(LevelDifferenceFactor)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.LevelDifferenceFactorHint))
                                .AddFloatingInteger(nameof(LeadershipSkillFactor),
                                                    Strings.LeadershipSkillFactorDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(LeadershipSkillFactor)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.LeadershipSkillFactorHint))
                                .AddFloatingInteger(nameof(TrainingXpPerLeadershipXp),
                                                    Strings.TrainingXpPerLeadershipXpDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(TrainingXpPerLeadershipXp)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.TrainingXpPerLeadershipXpHint))
                                .AddBool(nameof(WoundedReceiveTraining),
                                         Strings.WoundedReceiveTrainingDisplay,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(WoundedReceiveTraining)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.WoundedReceiveTrainingHint))
                                .AddBool(nameof(UpgradeableReceiveTraining),
                                         Strings.UpgradeableReceiveTrainingDisplay,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(UpgradeableReceiveTraining)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.UpgradeableReceiveTrainingHint))
                                );

            // Base Training Settings
            builder.CreateGroup($"{Strings.BaseTrainingSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .SetIsMainToggle(true)
                                .AddBool(nameof(EnableBaseTraining),
                                         Strings.BaseTrainingSettingsGroup,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(EnableBaseTraining)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.EnableBaseTrainingHint))
                                );

            builder.CreateGroup($"{Strings.BaseTrainingSettingsGroup}" +
                                $"/{Strings.GeneralSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddInteger(nameof(BaseTrainingXpAmount),
                                            Strings.BaseTrainingXpAmountDisplay, 0, 100,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(BaseTrainingXpAmount)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.BaseTrainingXpAmountHint))
                                .AddInteger(nameof(BaseTrainingMaxTierTrained),
                                            Strings.BaseTrainingTierDisplay, 0, 20,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(BaseTrainingMaxTierTrained)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.BaseTrainingTierHint))
                                );


            // Garrison Training Overrides
            builder.CreateGroup($"{Strings.GarrisonGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .SetIsMainToggle(true)
                                .AddBool(nameof(EnableGarrisonTraining),
                                         Strings.GarrisonGroup,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(EnableGarrisonTraining)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.EnableGarrisonTrainingOverrideHint))
                                );

            builder.CreateGroup($"{Strings.GarrisonGroup}/" +
                                $"{Strings.GeneralSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddInteger(nameof(LevelOneTrainingFieldXpAmount),
                                            Strings.LevelOneTrainingFieldXpAmountDisplay, 0, 100,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(LevelOneTrainingFieldXpAmount)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.LevelOneTrainingFieldXpAmountHint))
                                .AddInteger(nameof(GarrisonTrainingMaxTierTrained),
                                            Strings.GarrisonMaxTierTrainedDisplay, 0, 20,
                                            new PropertyRef(typeof(Settings).GetProperty(
                                                                nameof(GarrisonTrainingMaxTierTrained)), this),
                                            builder => builder
                                            .SetRequireRestart(false)
                                            .SetOrder(order++)
                                            .SetHintText(Strings.GarrisionMaxTierTrainedHint))
                                .AddFloatingInteger(nameof(PlayerClanGarrisonTrainingXpMultiplier),
                                                    Strings.PlayerClanGarrisonTrainingMultDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerClanGarrisonTrainingXpMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerClanGarrisonTrainingMultHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(NonPlayerClanGarrisonTrainingXpMultiplier),
                                                    Strings.NonPlayerClanGarrisonTrainingMultDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(NonPlayerClanGarrisonTrainingXpMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.NonPlayerClanGarrisonTrainingMultHint)
                                                    .AddValueFormat("#0%"))
                                );

            // Financial Solutions Settings
            builder.CreateGroup($"{Strings.FinancialSolutionsSettingGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .SetIsMainToggle(true)
                                .AddBool(nameof(EnableFinancialSolutions),
                                         Strings.FinancialSolutionsSettingGroup,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(EnableFinancialSolutions)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.EnableFinancialSolutionsHint))
                                );

            builder.CreateGroup($"{Strings.FinancialSolutionsSettingGroup}" +
                                $"/{Strings.PlayerSubgroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddFloatingInteger(nameof(PlayerTownTaxIncomeMultiplier),
                                                    Strings.PlayerTownTaxIncomeMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerTownTaxIncomeMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerTownTaxIncomeMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(PlayerVillageTaxIncomeMultiplier),
                                                    Strings.PlayerVillageTaxIncomeMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerVillageTaxIncomeMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerVillageTaxIncomeMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(PlayerClanPartyWageMultiplier),
                                                    Strings.PlayerClanPartyWageMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(PlayerClanPartyWageMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.PlayerClanPartyWageMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                );

            builder.CreateGroup($"{Strings.FinancialSolutionsSettingGroup}" +
                                $"/{Strings.AISubgroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddFloatingInteger(nameof(NonPlayerTownTaxIncomeMultiplier),
                                                    Strings.NonPlayerTownTaxIncomeMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(NonPlayerTownTaxIncomeMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.NonPlayerTownTaxIncomeMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(NonPlayerVillageTaxIncomeMultiplier),
                                                    Strings.NonPlayerVillageTaxIncomeMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(NonPlayerVillageTaxIncomeMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.NonPlayerVillageTaxIncomeMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                .AddFloatingInteger(nameof(NonPlayerClanPartyWageMultiplier),
                                                    Strings.NonPlayerClanPartyWageMultiplierDisplay, 0f, 20f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(NonPlayerClanPartyWageMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.NonPlayerClanPartyWageMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                );

            builder.CreateGroup($"{Strings.FinancialSolutionsSettingGroup}" +
                                $"/{Strings.GeneralSettingsGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddFloatingInteger(nameof(TroopUpgradeCostMultiplier),
                                                    Strings.TroopUpgradeCostMultiplierDisplay, 0f, 50f,
                                                    new PropertyRef(typeof(Settings).GetProperty(
                                                                        nameof(TroopUpgradeCostMultiplier)), this),
                                                    builder => builder
                                                    .SetRequireRestart(false)
                                                    .SetOrder(order++)
                                                    .SetHintText(Strings.TroopUpgradeCostMultiplierHint)
                                                    .AddValueFormat("#0%"))
                                );

            // Debug stuff
            builder.CreateGroup($"{Strings.DebugSettingGroup}",
                                groupBuilder => groupBuilder
                                .SetGroupOrder(order++)
                                .AddBool(nameof(DebugMode),
                                         Strings.EnableDebugModeDisplay,
                                         new PropertyRef(typeof(Settings).GetProperty(
                                                             nameof(DebugMode)), this),
                                         builder => builder
                                         .SetRequireRestart(false)
                                         .SetOrder(order++)
                                         .SetHintText(Strings.EnableDebugModeHint))
                                );

            // Build and register the settings
            _settings = builder.BuildAsGlobal();
            _settings.Register();
        }