diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-06-20 23:02:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 23:02:53 +0200 |
commit | afcce659fac73e9c1d453a8b4d7f149bc4dd8e60 (patch) | |
tree | 384a5bca54150f555f839dd3cfd6e915d666b9f4 /src/main/java/at | |
parent | 0e16228c3383c4913c452ba5eaa5418775000647 (diff) | |
download | skyhanni-afcce659fac73e9c1d453a8b4d7f149bc4dd8e60.tar.gz skyhanni-afcce659fac73e9c1d453a8b4d7f149bc4dd8e60.tar.bz2 skyhanni-afcce659fac73e9c1d453a8b4d7f149bc4dd8e60.zip |
Fix: ChocoFactory Custom Reminder trigger on TimeTower charge use. (#2126)
Diffstat (limited to 'src/main/java/at')
2 files changed, 19 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java index a451cda80..7c6fb1b14 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/chocolatefactory/ChocolateFactoryConfig.java @@ -182,6 +182,12 @@ public class ChocolateFactoryConfig { public boolean highlightRabbitsWithRequirement = false; @Expose + @ConfigOption(name = "Only Requirement Not Met", desc = "Only highlight the rabbits you don't have the requirement for.") + @ConfigEditorBoolean + @FeatureToggle + public boolean onlyHighlightRequirementNotMet = true; + + @Expose @ConfigOption( name = "Show Missing Location Rabbits", desc = "Show the locations you have yet to find enough egg locations for in order to unlock the rabbit for that location." @@ -191,12 +197,6 @@ public class ChocolateFactoryConfig { public boolean showLocationRequirementsRabbitsInHoppityStats = false; @Expose - @ConfigOption(name = "Only Requirement Not Met", desc = "Only highlight the rabbits you don't have the requirement for.") - @ConfigEditorBoolean - @FeatureToggle - public boolean onlyHighlightRequirementNotMet = true; - - @Expose @ConfigOption(name = "Rabbit Warning", desc = "") @Accordion public ChocolateFactoryRabbitWarningConfig rabbitWarning = new ChocolateFactoryRabbitWarningConfig(); diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryCustomReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryCustomReminder.kt index 2439641c3..d903c4f0b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryCustomReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryCustomReminder.kt @@ -63,6 +63,7 @@ object ChocolateFactoryCustomReminder { fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (!isEnabled()) return val item = event.item ?: return + if (event.clickedButton != 0) return // TODO add support for prestige and for Chocolate Milestone val cost = ChocolateFactoryAPI.getChocolateBuyCost(item.getLore()) ?: return val duration = ChocolateAmount.CURRENT.timeUntilGoal(cost) @@ -110,9 +111,14 @@ object ChocolateFactoryCustomReminder { private fun update() { display = mutableListOf<Renderable>().also { list -> getTargetDescription()?.let { - list.add(Renderable.clickAndHover(it, listOf("§eClick to remove the goal!"), onClick = { - reset() - })) + list.add( + Renderable.clickAndHover( + it, listOf("§eClick to remove the goal!"), + onClick = { + reset() + }, + ), + ) } } } @@ -138,10 +144,12 @@ object ChocolateFactoryCustomReminder { if (configUpgradeWarnings.upgradeWarningSound) { SoundUtils.playBeepSound() } - ChatUtils.clickableChat("You can now purchase §f$targetName §ein Chocolate factory!", + ChatUtils.clickableChat( + "You can now purchase §f$targetName §ein Chocolate factory!", onClick = { HypixelCommands.chocolateFactory() - }) + }, + ) } private fun reset() { |