diff options
author | Cow <cow@volloeko.de> | 2021-04-24 14:32:14 +0200 |
---|---|---|
committer | Cow <cow@volloeko.de> | 2021-04-24 14:32:14 +0200 |
commit | cabcf4201311afd9a6f05952b5acf03166cff0c8 (patch) | |
tree | 9ea3fbeb308d1089baa8f3229350882afdd931e9 /src | |
parent | 94517b10f9a005e9996b4d8a6c831eed80c958b4 (diff) | |
download | Cowlection-cabcf4201311afd9a6f05952b5acf03166cff0c8.tar.gz Cowlection-cabcf4201311afd9a6f05952b5acf03166cff0c8.tar.bz2 Cowlection-cabcf4201311afd9a6f05952b5acf03166cff0c8.zip |
Added config option to hide Gear Score separately
Diffstat (limited to 'src')
3 files changed, 20 insertions, 3 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java index 27f12e7..5006953 100644 --- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java +++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java @@ -94,6 +94,7 @@ public class MooConfig { // Category: SkyBlock Dungeons private static String showItemQualityAndFloor; private static String dungItemQualityPos; + public static boolean dungItemHideGearScore; public static int dungItemToolTipToggleKeyBinding; public static boolean dungSendPerformanceOnDeath; public static boolean dungOverlayEnabled; @@ -503,6 +504,9 @@ public class MooConfig { MooConfigPreview.createDungeonItem("light", "7/17/20 7:22 PM", "§7Gear Score: §d336 §8(526)", "§7Crit Chance: §c+5% §9(Light +2%)", "§7Crit Damage: §c+30% §9(Light +4%) §8(+48.9%)", "§7Bonus Attack Speed: §c+4% §9(Light +4%)", "", "§7Health: §a+126 HP §9(Light +15 HP) §8(+205.38 HP)", "§7Defense: §a+76 §9(Light +4) §8(+123.88)", "§7Speed: §a+4 §9(Light +4) §8(+6.52)", "", "§9Growth V, §9Protection V", "§9Thorns III", "", "§7Increase the damage you deal", "§7with arrows by §c5%§7.", "", "§6Full Set Bonus: Skeleton Soldier", "§7Increase the damage you deal", "§7with arrows by an extra §c25%§7.", "", "§aPerfect 52500 / 52500", "§5§lEPIC DUNGEON LEGGINGS"), MooConfigPreview.createDungeonItem("clean", "7/11/20 12:27 PM", "§7Gear Score: §d359 §8(561)", "§7Crit Chance: §c+11% §9(Clean +8%)", "§7Crit Damage: §c+26% §8(+42.38%)", "", "§7Health: §a+126 HP §9(Clean +15 HP) §8(+205.38 HP)", "§7Defense: §a+87 §9(Clean +15) §8(+141.81)", "", "§9Growth V, §9Protection V", "§9Thorns III", "", "§7Increase the damage you deal", "§7with arrows by §c5%§7.", "", "§6Full Set Bonus: Skeleton Soldier", "§7Increase the damage you deal", "§7with arrows by an extra §c25%§7.", "", "§aPerfect 52500 / 52500", "§5§lEPIC DUNGEON LEGGINGS"))); + Property propDungItemHideGearScore = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), + "dungItemHideGearScore", false, "Hide Gear Score?")); + Property propDungItemToolTipToggleKeyBinding = subCat.addConfigEntry(cfg.get(configCat.getConfigName(), "dungItemToolTipToggleKeyBinding", Keyboard.KEY_LSHIFT, "Key to toggle dungeon item tooltip")); @@ -669,6 +673,7 @@ public class MooConfig { // Category: SkyBlock Dungeons showItemQualityAndFloor = propShowItemQualityAndFloor.getString(); dungItemQualityPos = propDungItemQualityPos.getString(); + dungItemHideGearScore = propDungItemHideGearScore.getBoolean(); dungItemToolTipToggleKeyBinding = propDungItemToolTipToggleKeyBinding.getInt(); dungSendPerformanceOnDeath = propDungSendPerformanceOnDeath.getBoolean(); dungOverlayEnabled = propDungOverlayEnabled.getBoolean(); @@ -750,6 +755,7 @@ public class MooConfig { // Category: SkyBlock Dungeons propShowItemQualityAndFloor.set(showItemQualityAndFloor); propDungItemQualityPos.set(dungItemQualityPos); + propDungItemHideGearScore.set(dungItemHideGearScore); propDungItemToolTipToggleKeyBinding.set(dungItemToolTipToggleKeyBinding); propDungSendPerformanceOnDeath.set(dungSendPerformanceOnDeath); propDungOverlayEnabled.set(dungOverlayEnabled); diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java index e2be6c4..1ca65fa 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsListener.java @@ -162,11 +162,20 @@ public class DungeonsListener { } if (showItemQualityAndFloor) { if (MooConfig.isDungItemQualityAtTop()) { - // replace gear score with item quality + obtained floor to top of tooltip - tooltipIterator.set(customGearScore.toString()); + if (MooConfig.dungItemHideGearScore) { + // replace gear score with item quality + obtained floor to top of tooltip + tooltipIterator.set(customGearScore.toString()); + } else { + // add item quality + obtained floor + tooltipIterator.add(customGearScore.toString()); + } } else { // add item quality + obtained floor to bottom itemQualityBottom = customGearScore.toString(); + if (MooConfig.dungItemHideGearScore) { + // remove gear score entry + tooltipIterator.remove(); + } } } continue; diff --git a/src/main/resources/assets/cowlection/lang/en_US.lang b/src/main/resources/assets/cowlection/lang/en_US.lang index 195d148..9cdf1e0 100644 --- a/src/main/resources/assets/cowlection/lang/en_US.lang +++ b/src/main/resources/assets/cowlection/lang/en_US.lang @@ -81,7 +81,9 @@ cowlection.config.lookupItemDirectly.tooltip=Should the corresponding website be cowlection.config.showItemQualityAndFloor=Show item quality + obtained floor cowlection.config.showItemQualityAndFloor.tooltip=Should the item quality (in %%) and the obtained floor be added to the dungeon items' tooltips? cowlection.config.dungItemQualityPos=Item quality + obtained floor position -cowlection.config.dungItemQualityPos.tooltip=Position of item quality and obtained floor in dungeon item tooltips\n§e'top' replaces the default 'gear score' entry §rwhich normally includes reforges and essence upgrades. +cowlection.config.dungItemQualityPos.tooltip=Position of item quality and obtained floor in dungeon item tooltips +cowlection.config.dungItemHideGearScore=Hide 'Gear Score'? +cowlection.config.dungItemHideGearScore.tooltip=Should the 'Gear Score' be hidden from dungeon items?\n§eGear Score is a rough estimate of how powerful an item is. §rHowever, it's also affected by reforges, enchantments, and essence upgrades, so two items with identical base stats, but different reforges will have different Gear Scores. cowlection.config.dungItemToolTipToggleKeyBinding=Key binding: Show dungeon item base stats cowlection.config.dungItemToolTipToggleKeyBinding.tooltip=Hold down this key to toggle dungeon item tooltip.\nDisplays the base stats of an item without reforges and without essence upgrades.\n\n§7§odisable key binding: §e§oset key binding to §lESC cowlection.config.dungSendPerformanceOnDeath=Send player deaths overview after each death? |