aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFazfoxy <78978526+Fazfoxy@users.noreply.github.com>2024-10-19 22:59:08 +0100
committerGitHub <noreply@github.com>2024-10-19 23:59:08 +0200
commitaa3f82c846599e0f66d0e2fcc420e70d435fc175 (patch)
tree8db759b2ce5d556b250d92b409590b905d4167e8
parentb8523a351cef8530ed64d033944089b69140c506 (diff)
downloadSkyHanni-aa3f82c846599e0f66d0e2fcc420e70d435fc175.tar.gz
SkyHanni-aa3f82c846599e0f66d0e2fcc420e70d435fc175.tar.bz2
SkyHanni-aa3f82c846599e0f66d0e2fcc420e70d435fc175.zip
Fix: Fear stat display (#2766)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt7
3 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java
index 58c3bb4e1..9c6262e41 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/GreatSpookConfig.java
@@ -26,7 +26,9 @@ public class GreatSpookConfig {
public Position positionTimer = new Position(20, 20, false, true);
@Expose
- @ConfigOption(name = "Fear Stat Display", desc = "Show your current Fear stat value.")
+ @ConfigOption(name = "Fear Stat Display",
+ desc = "Show Fear stat as single GUI element.\n" +
+ "§eRequires tab list widget enabled and Fear selected to update live.")
@ConfigEditorBoolean
@FeatureToggle
public boolean fearStatDisplay = false;
diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt
index 3f5019509..c98c32aa5 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt
@@ -63,7 +63,7 @@ enum class SkyblockStat(
FORAGING_FORTUNE("§☘", " Foraging Fortune: §r§6☘(?<value>.*)", " §6☘ Foraging Fortune §f(?<value>.*)"),
FARMING_FORTUNE("§6☘", " (?:§r§7§m)?Farming Fortune: (?:§r§6)?☘(?<value>.*)", " (?:§7§m|§6)☘ Farming Fortune (?:§f)?(?<value>.*)"),
MINING_FORTUNE("§6☘", " Mining Fortune: §r§6☘(?<value>.*)", " §6☘ Mining Fortune §f(?<value>.*)"),
- FEAR("§a☠", "", ""), // Skyblock does not like fear. It only shows during Great Spook, therefore no Data.
+ FEAR("§5☠", " Fear: §r§5☠(?<value>.*)", " §5☠ Fear §f(?<value>.*)"),
COLD_RESISTANCE("§b❄", " Cold Resistance: §r§b❄(?<value>.*)", ""),
WHEAT_FORTUNE("§7☘", "", " §7(?:§m)☘ Wheat Fortune (?<value>.*)"),
CARROT_FORTUNE("§7☘", "", " §7(?:§m)☘ Carrot Fortune (?<value>.*)"),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt
index 7bdc404ce..6618b73f3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.event.spook
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.model.SkyblockStat
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
@@ -16,7 +17,6 @@ object TheGreatSpook {
// §r§cPrimal Fears§r§7: §r§6§lREADY!!
private val config get() = SkyHanniMod.feature.event.spook
private var displayTimer = ""
- private var displayFearStat = ""
private var displayTimeLeft = ""
private var notificationSeconds = 0
@@ -25,7 +25,6 @@ object TheGreatSpook {
if (isAllDisabled()) return
if (isTimerEnabled() || isNotificationEnabled()) displayTimer = checkTabList(" §r§cPrimal Fears§r§7: ")
- if (isFearStatEnabled()) displayFearStat = checkTabList(" §r§5Fear: ")
if (isTimeLeftEnabled()) displayTimeLeft = checkTabList(" §r§dEnds In§r§7: ")
if (isNotificationEnabled()) {
if (displayTimer.endsWith("READY!!")) {
@@ -46,7 +45,9 @@ object TheGreatSpook {
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) {
if (isTimerEnabled()) config.positionTimer.renderString(displayTimer, posLabel = "Primal Fear Timer")
- if (isFearStatEnabled()) config.positionFear.renderString(displayFearStat, posLabel = "Fear Stat Display")
+ if (isFearStatEnabled() && SkyblockStat.FEAR.lastKnownValue != 0.0) {
+ config.positionFear.renderString(SkyblockStat.FEAR.displayValue, posLabel = "Fear Stat Display")
+ }
if (isTimeLeftEnabled()) config.positionTimeLeft.renderString(displayTimeLeft, posLabel = "Time Left Display")
}