aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorNeoNyaa <56982408+NeoNyaa@users.noreply.github.com>2024-10-16 12:02:03 +0100
committerGitHub <noreply@github.com>2024-10-16 13:02:03 +0200
commit17b3900dabc7ba6d73e9fc50c4936f408314f30d (patch)
tree25e607170e8001aa502f06ef5bd2f1b165e1d032 /src/main/java/at/hannibal2/skyhanni
parent56707dc4f7c2025bd505911c7cfdbdbd0acaaba1 (diff)
downloadskyhanni-17b3900dabc7ba6d73e9fc50c4936f408314f30d.tar.gz
skyhanni-17b3900dabc7ba6d73e9fc50c4936f408314f30d.tar.bz2
skyhanni-17b3900dabc7ba6d73e9fc50c4936f408314f30d.zip
Improvement: Added option to show the barn fishing timer anywhere. (#2735)
Co-authored-by: martimavocado <39881008+martimavocado@users.noreply.github.com> Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt8
2 files changed, 13 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java
index d62d066e5..d06cee6d3 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java
@@ -23,6 +23,14 @@ public class BarnTimerConfig {
@Expose
@ConfigOption(
+ name = "Show Anywhere",
+ desc = "Show the Barn Fishing Timer whenever you fish up a sea creature, regardless of location."
+ )
+ @ConfigEditorBoolean
+ public boolean showAnywhere = false;
+
+ @Expose
+ @ConfigOption(
name = "Worm Fishing",
desc = "Show the Barn Fishing Timer in the Crystal Hollows."
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt
index 5be021fbb..c699191a5 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt
@@ -65,7 +65,7 @@ object FishingTimer {
@SubscribeEvent
fun onSecondPassed(event: SecondPassedEvent) {
if (!isEnabled()) return
- updateLocation()
+ rightLocation = updateLocation()
if (startTime.passedSince().inWholeSeconds - config.alertTime in 0..3) {
playSound()
}
@@ -170,8 +170,10 @@ object FishingTimer {
display = createDisplay()
}
- private fun updateLocation() {
- rightLocation = when (LorenzUtils.skyBlockIsland) {
+ private fun updateLocation(): Boolean {
+ if (config.showAnywhere) return true
+
+ return when (LorenzUtils.skyBlockIsland) {
IslandType.CRYSTAL_HOLLOWS -> config.crystalHollows.get()
IslandType.CRIMSON_ISLE -> config.crimsonIsle.get()
IslandType.WINTER -> config.winterIsland.get()