aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorAlexia Luna <me@alexia.lol>2024-03-19 10:04:21 +0100
committerGitHub <noreply@github.com>2024-03-19 10:04:21 +0100
commitab060b5823d5eb5946aa80eea12c77896ece8fed (patch)
tree36a38ed3701680094398c629d3e6c4c4b34615f9 /src/main/java/at
parent68d54cef1cf410c51d026d22228de9b3e4a274fa (diff)
downloadskyhanni-ab060b5823d5eb5946aa80eea12c77896ece8fed.tar.gz
skyhanni-ab060b5823d5eb5946aa80eea12c77896ece8fed.tar.bz2
skyhanni-ab060b5823d5eb5946aa80eea12c77896ece8fed.zip
Feature: Update Rancher's Boots stack size for new update (#1149)
Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index fa3724bca..3aa5beaa2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -23,6 +23,7 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.VACUUM_GARDEN
import at.hannibal2.skyhanni.data.PetAPI
import at.hannibal2.skyhanni.events.RenderItemTipEvent
+import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.pests.PestAPI
import at.hannibal2.skyhanni.features.skillprogress.SkillType
import at.hannibal2.skyhanni.utils.ConfigUtils
@@ -183,13 +184,15 @@ object ItemDisplayOverlayFeatures {
if (RANCHERS_BOOTS_SPEED.isSelected() && internalName == "RANCHERS_BOOTS".asInternalName()) {
item.getRanchersSpeed()?.let {
- return if (it > 400 && !(PetAPI.isCurrentPet("Black Cat") ||
- InventoryUtils.getHelmet()?.getInternalName() == "RACING_HELMET".asInternalName())
- ) {
- "§c$it"
- } else {
- "§a$it"
- }
+ val isUsingBlackCat = PetAPI.isCurrentPet("Black Cat")
+ val helmet = InventoryUtils.getHelmet()?.getInternalName()
+ val hand = InventoryUtils.getItemInHand()?.getInternalName()
+ val racingHelmet = "RACING_HELMET".asInternalName()
+ val cactusKnife = "CACTUS_KNIFE".asInternalName()
+ val is500 = isUsingBlackCat || helmet == racingHelmet || (GardenAPI.inGarden() && hand == cactusKnife)
+ val effectiveSpeedCap = if (is500) 500 else 400
+ val text = if (it > 999) "1k" else "$it"
+ return if (it > effectiveSpeedCap) "§c$text" else "§a$text"
}
}