diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 17 |
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" } } |