From 2afac7b0a8b15c30852ad329ed63c70c7cde25ec Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 31 Dec 2023 16:29:32 +0800 Subject: Add Dungeon Score --- .../hysky/skyblocker/config/SkyblockerConfig.java | 17 ++++++++++ .../config/categories/DungeonsCategory.java | 38 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java index 25d0c0bc..6f7e4a2d 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java @@ -590,6 +590,9 @@ public class SkyblockerConfig { @SerialEntry public DoorHighlight doorHighlight = new DoorHighlight(); + @SerialEntry + public DungeonScore dungeonScore = new DungeonScore(); + @SerialEntry public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit(); @@ -715,6 +718,20 @@ public class SkyblockerConfig { } } + public static class DungeonScore { + @SerialEntry + public boolean enableDungeonScore270 = true; + + @SerialEntry + public String dungeonScore270Message = "270 Score Reached!"; + + @SerialEntry + public boolean enableDungeonScore300 = true; + + @SerialEntry + public String dungeonScore300Message = "300 Score Reached!"; + } + public static class DungeonChestProfit { @SerialEntry public boolean enableProfitCalculator = true; diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java index 79e0b00c..b300be36 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java @@ -167,6 +167,44 @@ public class DungeonsCategory { .build()) .build()) + //Dungeon Score + .group(OptionGroup.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore")) + .collapsed(true) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScore", 270)) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScore.@Tooltip", 270))) + .binding(defaults.locations.dungeons.dungeonScore.enableDungeonScore270, + () -> config.locations.dungeons.dungeonScore.enableDungeonScore270, + newValue -> config.locations.dungeons.dungeonScore.enableDungeonScore270 = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.dungeonScoreMessage", 270)) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.dungeonScoreMessage.@Tooltip", 270, 270))) + .binding(defaults.locations.dungeons.dungeonScore.dungeonScore270Message, + () -> config.locations.dungeons.dungeonScore.dungeonScore270Message, + newValue -> config.locations.dungeons.dungeonScore.dungeonScore270Message = newValue) + .controller(StringControllerBuilder::create) + .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScore", 300)) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.enableDungeonScore.@Tooltip", 300))) + .binding(defaults.locations.dungeons.dungeonScore.enableDungeonScore300, + () -> config.locations.dungeons.dungeonScore.enableDungeonScore300, + newValue -> config.locations.dungeons.dungeonScore.enableDungeonScore300 = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.createBuilder() + .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.dungeonScoreMessage", 300)) + .description(OptionDescription.of(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonScore.dungeonScoreMessage.@Tooltip", 300, 300))) + .binding(defaults.locations.dungeons.dungeonScore.dungeonScore300Message, + () -> config.locations.dungeons.dungeonScore.dungeonScore300Message, + newValue -> config.locations.dungeons.dungeonScore.dungeonScore300Message = newValue) + .controller(StringControllerBuilder::create) + .build()) + .build()) + //Dungeon Chest Profit .group(OptionGroup.createBuilder() .name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit")) -- cgit