aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-24 17:27:31 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-24 17:27:31 +0100
commit062d91538e9519c503710e1d3bd6c895860ac68a (patch)
tree28d3fcf658a97a52b92e9de5111307500c0ee340 /src/main
parent8dfbcf2a67f0a8207e49d8a97e18c4e80f8fbb96 (diff)
downloadskyhanni-062d91538e9519c503710e1d3bd6c895860ac68a.tar.gz
skyhanni-062d91538e9519c503710e1d3bd6c895860ac68a.tar.bz2
skyhanni-062d91538e9519c503710e1d3bd6c895860ac68a.zip
Properly resetting internal diana data on clearing waypoints via NPC.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt6
3 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
index ac02e25c1..13eda191a 100644
--- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
+++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
@@ -2,8 +2,8 @@ package at.hannibal2.skyhanni
import at.hannibal2.skyhanni.api.CollectionAPI
import at.hannibal2.skyhanni.api.DataWatcherAPI
-import at.hannibal2.skyhanni.api.SkillAPI
import at.hannibal2.skyhanni.api.GetFromSackAPI
+import at.hannibal2.skyhanni.api.SkillAPI
import at.hannibal2.skyhanni.config.ConfigFileType
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.config.Features
@@ -285,8 +285,6 @@ import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue
import at.hannibal2.skyhanni.features.misc.items.EstimatedWardrobePrice
import at.hannibal2.skyhanni.features.misc.items.GlowingDroppedItems
import at.hannibal2.skyhanni.features.misc.massconfiguration.DefaultConfigFeatures
-import at.hannibal2.skyhanni.features.skillprogress.SkillTooltip
-import at.hannibal2.skyhanni.features.skillprogress.SkillProgress
import at.hannibal2.skyhanni.features.misc.teleportpad.TeleportPadCompactName
import at.hannibal2.skyhanni.features.misc.teleportpad.TeleportPadInventoryNumber
import at.hannibal2.skyhanni.features.misc.trevor.TrevorFeatures
@@ -330,6 +328,8 @@ import at.hannibal2.skyhanni.features.rift.everywhere.RiftHorsezookaHider
import at.hannibal2.skyhanni.features.rift.everywhere.RiftTimer
import at.hannibal2.skyhanni.features.rift.everywhere.motes.RiftMotesOrb
import at.hannibal2.skyhanni.features.rift.everywhere.motes.ShowMotesNpcSellPrice
+import at.hannibal2.skyhanni.features.skillprogress.SkillProgress
+import at.hannibal2.skyhanni.features.skillprogress.SkillTooltip
import at.hannibal2.skyhanni.features.slayer.HideMobNames
import at.hannibal2.skyhanni.features.slayer.SlayerBossSpawnSoon
import at.hannibal2.skyhanni.features.slayer.SlayerItemsOnGround
@@ -564,7 +564,7 @@ class SkyHanniMod {
loadModule(TheGreatSpook())
loadModule(GriffinBurrowHelper)
loadModule(AllBurrowsList)
- loadModule(GriffinBurrowParticleFinder())
+ loadModule(GriffinBurrowParticleFinder)
loadModule(BurrowWarpHelper())
loadModule(CollectionTracker())
loadModule(HighlightBonzoMasks())
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
index 5d7971d0f..4d839fc21 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
@@ -160,6 +160,9 @@ object GriffinBurrowHelper {
guessLocation = null
targetLocation = null
particleBurrows = emptyMap()
+ GriffinBurrowParticleFinder.reset()
+
+ BurrowWarpHelper.currentWarp = null
update()
}
@@ -336,7 +339,7 @@ object GriffinBurrowHelper {
val type: BurrowType = when (strings[0].lowercase()) {
"reset" -> {
resetAllData()
- ChatUtils.chat("Manually reset all burrow waypoints.")
+ ChatUtils.chat("Manually reset all burrow data.")
return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
index 9c83dfeda..99aad9022 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
@@ -22,7 +22,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
-class GriffinBurrowParticleFinder {
+object GriffinBurrowParticleFinder {
private val config get() = SkyHanniMod.feature.event.diana
@@ -122,6 +122,10 @@ class GriffinBurrowParticleFinder {
@SubscribeEvent
fun onWorldChange(event: LorenzWorldChangeEvent) {
+ reset()
+ }
+
+ fun reset() {
burrows.clear()
recentlyDugParticleBurrows.clear()
}