From 6464576da02fc6a110cda882c51026b35151d440 Mon Sep 17 00:00:00 2001 From: nopo Date: Tue, 28 May 2024 22:00:08 +1000 Subject: [PATCH 1/2] gerherher --- .../mining/MiningNotificationsConfig.java | 11 ++++++++++- .../features/mining/MiningNotifications.kt | 16 +++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java index 30394ba34eb7..e72e9a9460e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java @@ -47,9 +47,18 @@ public class MiningNotificationsConfig { @Expose @ConfigOption( name = "Get Ascension Rope", - desc = "Click on a chat message to get an Ascension Rope when you're at 90 Cold and in the §bMineshaft§7. " + + desc = "Click on a chat message to get an Ascension Rope when you're at a certain amount of Cold and in the §bMineshaft§7. " + "§cOnly works if you have an Ascension Rope in your sacks." ) @ConfigEditorBoolean public boolean getAscensionRope = true; + + @Expose + @ConfigOption( + name = "Get Ascension Rope", + desc = "Click on a chat message to get an Ascension Rope when you're at a certain amount of Cold and in the §bMineshaft§7. " + + "§cOnly works if you have an Ascension Rope in your sacks." + ) + @ConfigEditorSlider(minValue = 1, maxValue = 100, minStep = 1) + public int coldAmount = 90; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt index 012a13240a48..370fd1815417 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt @@ -54,10 +54,6 @@ object MiningNotifications { "goblin.diamondspawn", "§6A §r§bDiamond Goblin §r§6has spawned!" ) - private val frostbitePattern by patternGroup.pattern( - "cold.frostbite", - "§9§lBRRR! §r§bYou're freezing! All you can think about is getting out of here to a warm campfire\\.\\.\\." - ) private val config get() = SkyHanniMod.feature.mining.notifications @@ -73,13 +69,6 @@ object MiningNotifications { scrapDrop.matches(message) -> sendNotification(MiningNotificationList.SCRAP) goldenGoblinSpawn.matches(message) -> sendNotification(MiningNotificationList.GOLDEN_GOBLIN) diamondGoblinSpawn.matches(message) -> sendNotification(MiningNotificationList.DIAMOND_GOBLIN) - frostbitePattern.matches(message) -> { - if (IslandType.MINESHAFT.isInIsland() && config.getAscensionRope) { - runDelayed(0.5.seconds) { - GetFromSackAPI.getFromChatMessageSackItems(ASCENSION_ROPE) - } - } - } } } @@ -93,6 +82,11 @@ object MiningNotifications { hasSentCold = true sendNotification(MiningNotificationList.COLD) } + if (IslandType.MINESHAFT.isInIsland() && config.getAscensionRope && config.coldAmount == event.cold) { + runDelayed(0.5.seconds) { + GetFromSackAPI.getFromChatMessageSackItems(ASCENSION_ROPE) + } + } } @SubscribeEvent From 91dba3ee453fcf245fabf62a1b0ced63f0701cd6 Mon Sep 17 00:00:00 2001 From: nopo Date: Tue, 28 May 2024 22:03:41 +1000 Subject: [PATCH 2/2] oops --- .../config/features/mining/MiningNotificationsConfig.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java index e72e9a9460e9..f5a1d0b766b8 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java @@ -55,9 +55,8 @@ public class MiningNotificationsConfig { @Expose @ConfigOption( - name = "Get Ascension Rope", - desc = "Click on a chat message to get an Ascension Rope when you're at a certain amount of Cold and in the §bMineshaft§7. " + - "§cOnly works if you have an Ascension Rope in your sacks." + name = "Cold Amount to Show Message", + desc = "Customise the amount of Cold you need to have to get the Ascension Rope message." ) @ConfigEditorSlider(minValue = 1, maxValue = 100, minStep = 1) public int coldAmount = 90;