diff options
author | Vixid <52578495+VixidDev@users.noreply.github.com> | 2024-04-25 08:43:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 09:43:01 +0200 |
commit | f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2 (patch) | |
tree | 4a1e45727434c16489c748fad7eefe4117be5875 /src/main/java/at/hannibal2/skyhanni/config | |
parent | ed53f750e6b68067f58a5e706db220760d57029f (diff) | |
download | skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.tar.gz skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.tar.bz2 skyhanni-f3b3b44296b8a6ac77ecad433ca28e7a03a9eaf2.zip |
Feature: SBA style Enchant Parsing (#654)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/inventory/EnchantParsingConfig.java | 93 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java | 4 |
2 files changed, 97 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/EnchantParsingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/EnchantParsingConfig.java new file mode 100644 index 000000000..bada2edee --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/EnchantParsingConfig.java @@ -0,0 +1,93 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.utils.LorenzColor; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +public class EnchantParsingConfig { + + @Expose + @ConfigOption(name = "Enable", desc = "Toggle for coloring the enchants. Turn this off if you want to use enchant parsing from other mods.") + @ConfigEditorBoolean + @FeatureToggle + public Property<Boolean> colorParsing = Property.of(true); + + @Expose + @ConfigOption(name = "Format", desc = "The way the enchants are formatted in the tooltip.") + @ConfigEditorDropdown() + public Property<EnchantFormat> format = Property.of(EnchantFormat.NORMAL); + + public enum EnchantFormat { + NORMAL("Normal"), + COMPRESSED("Compressed"), + STACKED("Stacked"); + + public final String str; + + EnchantFormat(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } + + @Expose + @ConfigOption(name = "Perfect Enchantment Color", desc = "The color an enchantment will be at max level.") + @ConfigEditorDropdown() + public Property<LorenzColor> perfectEnchantColor = Property.of(LorenzColor.CHROMA); + + @Expose + @ConfigOption(name = "Great Enchantment Color", desc = "The color an enchantment will be at a great level.") + @ConfigEditorDropdown() + public Property<LorenzColor> greatEnchantColor = Property.of(LorenzColor.GOLD); + + @Expose + @ConfigOption(name = "Good Enchantment Color", desc = "The color an enchantment will be at a good level.") + @ConfigEditorDropdown() + public Property<LorenzColor> goodEnchantColor = Property.of(LorenzColor.BLUE); + + @Expose + @ConfigOption(name = "Poor Enchantment Color", desc = "The color an enchantment will be at a poor level.") + @ConfigEditorDropdown() + public Property<LorenzColor> poorEnchantColor = Property.of(LorenzColor.GRAY); + + @Expose + @ConfigOption(name = "Comma Format", desc = "Change the format of the comma after each enchant.") + @ConfigEditorDropdown() + public Property<CommaFormat> commaFormat = Property.of(CommaFormat.COPY_ENCHANT); + + public enum CommaFormat { + COPY_ENCHANT("Copy enchant format"), + DEFAULT("Default (Blue)"); + + public final String str; + + CommaFormat(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } + + @Expose + @ConfigOption(name = "Hide Vanilla Enchants", desc = "Hide the regular vanilla enchants usually found in the first 1-2 lines of lore.") + @ConfigEditorBoolean + @FeatureToggle + public Property<Boolean> hideVanillaEnchants = Property.of(true); + + @Expose + @ConfigOption(name = "Hide Enchant Description", desc = "Hides the enchant description after each enchant if available.") + @ConfigEditorBoolean + @FeatureToggle + public Property<Boolean> hideEnchantDescriptions = Property.of(false); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 1bef14366..518730117 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -37,6 +37,10 @@ public class InventoryConfig { public BazaarConfig bazaar = new BazaarConfig(); @Expose + @Category(name = "Enchant Parsing", desc = "Settings for Skyhanni's Enchant Parsing") + public EnchantParsingConfig enchantParsing = new EnchantParsingConfig(); + + @Expose @Category(name = "Helpers", desc = "Settings for Helpers") public HelperConfig helper = new HelperConfig(); |