aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/event
diff options
context:
space:
mode:
authorDavid Cole <40234707+DavidArthurCole@users.noreply.github.com>2024-07-21 06:37:23 -0400
committerGitHub <noreply@github.com>2024-07-21 12:37:23 +0200
commitc4c0b5e80d506ef1f7811603dd1611da5a4b84bb (patch)
treec4455d49a21383869d6c29757d5e9dc68e2256a0 /src/main/java/at/hannibal2/skyhanni/features/event
parent30ad6049a0f84e2e7be6fe9c4e6ade9dcf159bf7 (diff)
downloadskyhanni-c4c0b5e80d506ef1f7811603dd1611da5a4b84bb.tar.gz
skyhanni-c4c0b5e80d506ef1f7811603dd1611da5a4b84bb.tar.bz2
skyhanni-c4c0b5e80d506ef1f7811603dd1611da5a4b84bb.zip
Improvement: Add Toggle for Unclaimed Egg Warp (#2211)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/event')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
index 06948f27a..f09aa4eac 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggDisplayManager.kt
@@ -72,14 +72,14 @@ object HoppityEggDisplayManager {
private fun updateDisplay(): List<Renderable> {
if (!HoppityEggsManager.isActive()) return emptyList()
- if (!HoppityEggsManager.config.showClaimedEggs) return emptyList()
- if (ReminderUtils.isBusy() && !HoppityEggsManager.config.showWhileBusy) return emptyList()
+ if (!config.showClaimedEggs) return emptyList()
+ if (ReminderUtils.isBusy() && !config.showWhileBusy) return emptyList()
val displayList =
HoppityEggType.entries.map { "§7 - ${it.formattedName} ${it.timeUntil().format()}" }.toMutableList()
displayList.add(0, "§bUnclaimed Eggs:")
- if (HoppityEggsManager.config.showCollectedLocationCount && LorenzUtils.inSkyBlock) {
+ if (config.showCollectedLocationCount && LorenzUtils.inSkyBlock) {
val totalEggs = HoppityEggLocations.islandLocations.size
if (totalEggs > 0) {
val collectedEggs = HoppityEggLocations.islandCollectedLocations.size
@@ -89,12 +89,13 @@ object HoppityEggDisplayManager {
}
if (displayList.size == 1) return emptyList()
+ val container = Renderable.verticalContainer(displayList.map(Renderable::string))
return listOf(
- Renderable.clickAndHover(
- Renderable.verticalContainer(displayList.map(Renderable::string)),
- tips = listOf("§eClick to ${"/warp ${HoppityEggsManager.config.warpDestination}".trim()}!"),
- onClick = { HypixelCommands.warp(HoppityEggsManager.config.warpDestination) },
- ),
+ if (config.warpUnclaimedEggs) Renderable.clickAndHover(
+ container,
+ tips = listOf("§eClick to ${"/warp ${config.warpDestination}".trim()}!"),
+ onClick = { HypixelCommands.warp(config.warpDestination) },
+ ) else container
)
}
@@ -102,7 +103,7 @@ object HoppityEggDisplayManager {
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent) {
if (!HoppityEggsManager.isActive()) return
- HoppityEggsManager.config.position.renderRenderables(display, posLabel = "Hoppity Eggs")
+ config.position.renderRenderables(display, posLabel = "Hoppity Eggs")
}
private fun formatEggsCollected(collectedEggs: Int): String =