aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authormartimavocado <39881008+martimavocado@users.noreply.github.com>2023-11-22 12:50:32 +0000
committerGitHub <noreply@github.com>2023-11-22 13:50:32 +0100
commitbe9126ef8f5154ed7f0562e43cbd6c499ca892ba (patch)
treec0dbdf8d23b1b7d5f7b168cada005e34d1aeb24e /src/main/java/at/hannibal2/skyhanni
parentab4ee55eb6b2951e24c4bed144b2cf68e86501c1 (diff)
downloadskyhanni-be9126ef8f5154ed7f0562e43cbd6c499ca892ba.tar.gz
skyhanni-be9126ef8f5154ed7f0562e43cbd6c499ca892ba.tar.bz2
skyhanni-be9126ef8f5154ed7f0562e43cbd6c499ca892ba.zip
Feature: Add support for barn fishing in the jerry's workshop and crimson isle (#705)
Added Barn Fishing Timer to Jerry's Workshop and Crimson Isle. #705
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/fishing/BarnTimerConfig.java16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt8
4 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 8e4791901..f622ba7bb 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -211,6 +211,10 @@ object Commands {
"Reset data about minion profit and the name display on the private island"
) { MinionFeatures.clearMinionData() }
registerCommand(
+ "whereami",
+ "Print current island in chat"
+ ) { SkyHanniDebugsAndTests.whereami() }
+ registerCommand(
"shconfig",
"Search or reset config elements §c(warning, dangerous!)"
) { SkyHanniConfigSearchResetCommand.command(it) }
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 eb0577135..6dbf5b99b 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
@@ -29,6 +29,22 @@ public class BarnTimerConfig {
@Expose
@ConfigOption(
+ name = "Lava Fishing",
+ desc = "Show the Barn Fishing Timer even while in the Crimson Isle."
+ )
+ @ConfigEditorBoolean
+ public boolean crimsonIsle = true;
+
+ @Expose
+ @ConfigOption(
+ name = "Winter Fishing",
+ desc = "Show the Barn Fishing Timer even on the Jerry's Workshop."
+ )
+ @ConfigEditorBoolean
+ public boolean winterIsland = true;
+
+ @Expose
+ @ConfigOption(
name = "Stranded Fishing",
desc = "Show the Barn Fishing Timer even on all the different islands Stranded players can visit."
)
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 fa2b9b824..501b217f4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt
@@ -92,6 +92,10 @@ class FishingTimer {
return true
}
+ if (config.crimsonIsle && IslandType.CRIMSON_ISLE.isInIsland()) return true
+
+ if (config.winterIsland && IslandType.WINTER.isInIsland()) return true
+
if (!IslandType.THE_FARMING_ISLANDS.isInIsland()) {
return LocationUtils.playerLocation().distance(barnLocation) < 50
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
index 635ea3351..de6ffef21 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt
@@ -250,6 +250,14 @@ class SkyHanniDebugsAndTests {
LorenzUtils.chat("stopped ${modules.size} listener classes.")
}
+ fun whereami() {
+ if (LorenzUtils.inSkyBlock) {
+ LorenzUtils.chat("§eYou are currently in ${LorenzUtils.skyBlockIsland}.")
+ return
+ }
+ LorenzUtils.chat("§eYou are not in Skyblock.")
+ }
+
fun copyLocation(args: Array<String>) {
val location = LocationUtils.playerLocation()
val x = LorenzUtils.formatDouble(location.x + 0.001).replace(",", ".")