diff options
Diffstat (limited to 'src/main/java')
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java index a53075016..dabb0d535 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/itemability/ItemAbilityConfig.java @@ -20,6 +20,11 @@ public class ItemAbilityConfig { public boolean itemAbilityCooldownBackground = false; @Expose + @ConfigOption(name = "Show When Ready", desc = "Show the R and background (if enabled) when the ability is ready.") + @ConfigEditorBoolean + public boolean itemAbilityShowWhenReady = true; + + @Expose @ConfigOption(name = "Fire Veil", desc = "") @Accordion public FireVeilWandConfig fireVeilWands = new FireVeilWandConfig(); diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index a547c14b4..dd1c1fedf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -242,11 +242,10 @@ class ItemAbilityCooldown { private fun createItemText(ability: ItemAbility): ItemText { val specialColor = ability.specialColor + val readyText = if (SkyHanniMod.feature.itemAbilities.itemAbilityShowWhenReady) "R" else "" return if (ability.isOnCooldown()) { - val duration: Long = - ability.lastActivation + ability.getCooldown() - System.currentTimeMillis() - val color = - specialColor ?: if (duration < 600) LorenzColor.RED else LorenzColor.YELLOW + val duration: Long = ability.lastActivation + ability.getCooldown() - System.currentTimeMillis() + val color = specialColor ?: if (duration < 600) LorenzColor.RED else LorenzColor.YELLOW ItemText(color, ability.getDurationText(), true, ability.alternativePosition) } else { if (specialColor != null) { @@ -254,7 +253,7 @@ class ItemAbilityCooldown { tryHandleNextPhase(ability, specialColor) return createItemText(ability) } - ItemText(LorenzColor.GREEN, "R", false, ability.alternativePosition) + ItemText(LorenzColor.GREEN, readyText, false, ability.alternativePosition) } } @@ -293,6 +292,7 @@ class ItemAbilityCooldown { var opacity = 130 if (color == LorenzColor.GREEN) { opacity = 80 + if (!SkyHanniMod.feature.itemAbilities.itemAbilityShowWhenReady) return } stack.background = color.addOpacity(opacity).rgb } |