Skip to content

Commit

Permalink
Feature: Update Rancher's Boots stack size for new update (#1149)
Browse files Browse the repository at this point in the history
Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 19, 2024
1 parent 68d54ce commit ab060b5
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}
}

Expand Down

0 comments on commit ab060b5

Please sign in to comment.