aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/garden
diff options
context:
space:
mode:
authorObsidian <108832807+Obsidianninja11@users.noreply.github.com>2024-06-22 03:50:06 -0500
committerGitHub <noreply@github.com>2024-06-22 10:50:06 +0200
commitfcc31674e40ed044f46813c2185f8de29d974932 (patch)
tree36a8721820fa98db8ec1eeb173340ef1f9242d26 /src/main/java/at/hannibal2/skyhanni/features/garden
parent1dff52a075c6873dd53342f4094ecf904d4f9d67 (diff)
downloadskyhanni-fcc31674e40ed044f46813c2185f8de29d974932.tar.gz
skyhanni-fcc31674e40ed044f46813c2185f8de29d974932.tar.bz2
skyhanni-fcc31674e40ed044f46813c2185f8de29d974932.zip
Improvement: Add hover descriptions to many ClickableChat messages (#1919)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt10
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt36
8 files changed, 54 insertions, 46 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
index 882c4daff..edc5f17ee 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
@@ -222,9 +222,8 @@ object FarmingFortuneDisplay {
ChatUtils.clickableChat(
"§cCan not read Farming Fortune from tab list! Open /widget, enable the Stats Widget and " +
"show the Farming Fortune stat, also give the widget enough priority.",
- onClick = {
- HypixelCommands.widget()
- }
+ onClick = { HypixelCommands.widget() },
+ "§eClick to run /widget!",
)
lastUniversalFortuneMissingError = SimpleTimeMark.now()
}
@@ -233,9 +232,8 @@ object FarmingFortuneDisplay {
ChatUtils.clickableChat(
"§cCan not read Crop Fortune from tab list! Open /widget, enable the Stats Widget and " +
"show latest Crop Fortune, also give the widget enough priority.",
- onClick = {
- HypixelCommands.widget()
- }
+ onClick = { HypixelCommands.widget() },
+ "§eClick to run /widget!",
)
lastCropFortuneMissingError = SimpleTimeMark.now()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
index 88993d42d..5177c0a16 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt
@@ -98,9 +98,8 @@ object GardenLevelDisplay {
ChatUtils.clickableChat(
" \n§b§lGARDEN LEVEL UP §8$oldLevel ➜ §b$newLevel\n" +
" §8+§aRespect from Elite Farmers and SkyHanni members :)\n ",
- onClick = {
- HypixelCommands.gardenLevels()
- },
+ onClick = { HypixelCommands.gardenLevels() },
+ "§eClick to view your Garden Level progress and rewards!",
prefix = false
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
index 35af817c6..8c2dc9a95 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenNextJacobContest.kt
@@ -252,9 +252,8 @@ object GardenNextJacobContest {
} else {
ChatUtils.clickableChat(
"§2Click here to submit this year's farming contests. Thank you for helping everyone out!",
- onClick = {
- shareContests()
- },
+ onClick = { shareContests() },
+ "§eClick to submit!",
oneTimeClick = true
)
}
@@ -310,6 +309,7 @@ object GardenNextJacobContest {
SkyHanniMod.feature.storage.contestSendingAsked = true
ChatUtils.chat("§2Enabled automatic sharing of future contests!")
},
+ "§eClick to enable autosharing!",
oneTimeClick = true
)
}
@@ -564,9 +564,11 @@ object GardenNextJacobContest {
}
} else {
ChatUtils.chat("This year's contests aren't available to fetch automatically yet, please load them from your calendar or wait 10 minutes.")
- ChatUtils.clickableChat("Click here to open your calendar!", onClick = {
- HypixelCommands.calendar()
- })
+ ChatUtils.clickableChat(
+ "Click here to open your calendar!",
+ onClick = { HypixelCommands.calendar() },
+ "§eClick to run /calendar!"
+ )
}
if (newContests.count() == MAX_CONTESTS_PER_YEAR) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
index a9977f809..bd4c8274c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
@@ -193,9 +193,13 @@ object ComposterDisplay {
if (IslandType.GARDEN.isInIsland()) {
ChatUtils.chat(warningMessage)
} else {
- ChatUtils.clickableChat(warningMessage, onClick = {
- HypixelCommands.warp("garden")
- })
+ ChatUtils.clickableChat(
+ warningMessage,
+ onClick = {
+ HypixelCommands.warp("garden")
+ },
+ "§eClick to warp to the garden!",
+ )
}
LorenzUtils.sendTitle("§eComposter Warning!", 3.seconds)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
index b12b8f190..303fd7464 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt
@@ -503,9 +503,8 @@ object ComposterOverlay {
val sackType = if (isDwarvenMineable) "Mining §eor §9Dwarven" else "Enchanted Agronomy"
ChatUtils.clickableChat(
"Sacks could not be loaded. Click here and open your §9$sackType Sack §eto update the data!",
- onClick = {
- HypixelCommands.sacks()
- }
+ onClick = { HypixelCommands.sacks() },
+ "§eClick to run /sax!",
)
return
}
@@ -528,9 +527,8 @@ object ComposterOverlay {
} else {
ChatUtils.clickableChat( // TODO Add this as a separate feature, and then don't send any msg if the feature is disabled
"You're out of $itemName §ein your sacks! Click here to buy more on the Bazaar!",
- onClick = {
- HypixelCommands.bazaar(itemName.removeColor())
- }
+ onClick = { HypixelCommands.bazaar(itemName.removeColor()) },
+ "§eClick find on the bazaar!",
)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
index 0a29c85ec..ba0eaee5d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneAPI.kt
@@ -52,9 +52,8 @@ object FarmingLaneAPI {
ChatUtils.clickableChat(
"No ${crop.cropName} lane defined yet! Use §e/shlanedetection",
- onClick = {
- FarmingLaneCreator.commandLaneDetection()
- }
+ onClick = { FarmingLaneCreator.commandLaneDetection() },
+ "§eClick to run /shlanedetection!",
)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
index 0dcab57f5..0b16439f3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
@@ -131,9 +131,13 @@ object PestSpawn {
}
if (config.chatMessageFormat == PestSpawnConfig.ChatMessageFormatEntry.COMPACT) {
- ChatUtils.clickableChat(message, onClick = {
- HypixelCommands.teleportToPlot(plotName)
- })
+ ChatUtils.clickableChat(
+ message,
+ onClick = {
+ HypixelCommands.teleportToPlot(plotName)
+ },
+ "§eClick to run /plottp $plotName!",
+ )
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index 386f3808f..6b3620c18 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -247,22 +247,26 @@ object GardenVisitorDropStatistics {
fun resetCommand() {
val storage = GardenAPI.storage?.visitorDrops ?: return
- ChatUtils.clickableChat("Click here to reset Visitor Drops Statistics.", onClick = {
- acceptedVisitors = 0
- deniedVisitors = 0
- totalVisitors = 0
- coinsSpent = 0
- storage.copper = 0
- storage.bits = 0
- storage.farmingExp = 0
- storage.gardenExp = 0
- storage.gemstonePowder = 0
- storage.mithrilPowder = 0
- storage.visitorRarities = arrayListOf(0, 0, 0, 0, 0)
- storage.rewardsCount = mapOf<VisitorReward, Int>()
- ChatUtils.chat("Visitor Drop Statistics reset!")
- saveAndUpdate()
- })
+ ChatUtils.clickableChat(
+ "Click here to reset Visitor Drops Statistics.",
+ onClick = {
+ acceptedVisitors = 0
+ deniedVisitors = 0
+ totalVisitors = 0
+ coinsSpent = 0
+ storage.copper = 0
+ storage.bits = 0
+ storage.farmingExp = 0
+ storage.gardenExp = 0
+ storage.gemstonePowder = 0
+ storage.mithrilPowder = 0
+ storage.visitorRarities = arrayListOf(0, 0, 0, 0, 0)
+ storage.rewardsCount = mapOf<VisitorReward, Int>()
+ ChatUtils.chat("Visitor Drop Statistics reset!")
+ saveAndUpdate()
+ },
+ "§eClick to reset!",
+ )
}
@SubscribeEvent