aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt23
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt4
2 files changed, 21 insertions, 6 deletions
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 5d53ce823..5d7971d0f 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
@@ -46,6 +46,7 @@ object GriffinBurrowHelper {
private var guessLocation: LorenzVec? = null
private var particleBurrows = mapOf<LorenzVec, BurrowType>()
var lastTitleSentTime = SimpleTimeMark.farPast()
+ private var shouldFocusOnInquis = false
@SubscribeEvent
fun onDebugDataCollect(event: DebugDataCollectEvent) {
@@ -74,16 +75,26 @@ object GriffinBurrowHelper {
update()
}
- private fun update() {
+ fun update() {
if (config.burrowsNearbyDetection) {
checkRemoveGuess()
}
- val locations = particleBurrows.keys.toMutableList()
- guessLocation?.let {
- locations.add(findBlock(it))
+ val locations = mutableListOf<LorenzVec>()
+
+ if (config.inquisitorSharing.enabled) {
+ for (waypoint in InquisitorWaypointShare.waypoints) {
+ locations.add(waypoint.value.location)
+ }
+ }
+ shouldFocusOnInquis = config.inquisitorSharing.focusInquisitor && locations.isNotEmpty()
+ if (!shouldFocusOnInquis) {
+ locations.addAll(particleBurrows.keys.toMutableList())
+ guessLocation?.let {
+ locations.add(findBlock(it))
+ }
+ locations.addAll(InquisitorWaypointShare.waypoints.values.map { it.location })
}
- locations.addAll(InquisitorWaypointShare.waypoints.values.map { it.location })
targetLocation = locations.minByOrNull { it.distanceToPlayer() }
if (config.burrowNearestWarp) {
@@ -219,7 +230,7 @@ object GriffinBurrowHelper {
color = LorenzColor.AQUA
currentWarp.location
} else {
- color = LorenzColor.WHITE
+ color = if (shouldFocusOnInquis) LorenzColor.LIGHT_PURPLE else LorenzColor.WHITE
targetLocation?.add(0.5, 0.5, 0.5) ?: return
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index d9ff8885f..bd8d5a210 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -129,6 +129,7 @@ object InquisitorWaypointShare {
logger.log("FOUND: $name")
inquisitorsNearby = inquisitorsNearby.editCopy { add(entity) }
+ GriffinBurrowHelper.update()
val diff = System.currentTimeMillis() - time
time = System.currentTimeMillis()
@@ -251,6 +252,7 @@ object InquisitorWaypointShare {
}
val inquis = SharedInquisitor(name, displayName, location, SimpleTimeMark.now())
waypoints = waypoints.editCopy { this[name] = inquis }
+ GriffinBurrowHelper.update()
event.isCanceled = true
}
@@ -259,6 +261,7 @@ object InquisitorWaypointShare {
val name = rawName.cleanPlayerName()
val displayName = rawName.cleanPlayerName(displayName = true)
waypoints = waypoints.editCopy { remove(name) }
+ GriffinBurrowHelper.update()
logger.log("Inquisitor died from '$displayName'")
}
}
@@ -268,6 +271,7 @@ object InquisitorWaypointShare {
fun maybeRemove(inquis: SharedInquisitor) {
if (inquisitorsNearby.isEmpty()) {
waypoints = waypoints.editCopy { remove(inquis.fromPlayer) }
+ GriffinBurrowHelper.update()
ChatUtils.chat("Inquisitor from ${inquis.displayName} not found, deleting.")
}
}