aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-08 10:45:20 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-08 10:45:20 +0200
commitbd9b82fcd881277a102a01926058c380e205edba (patch)
tree8e91516026485d81f17d4173e8c1e74d83f4fa33 /src
parenta25820e265782a9182657337a5dd9f14fb46c667 (diff)
downloadskyhanni-bd9b82fcd881277a102a01926058c380e205edba.tar.gz
skyhanni-bd9b82fcd881277a102a01926058c380e205edba.tar.bz2
skyhanni-bd9b82fcd881277a102a01926058c380e205edba.zip
Minotaur and Minos Champion no longer count as Inquisitor, added Inquis test command
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt22
2 files changed, 14 insertions, 9 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 9c5e3e04e..1e22403ab 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -70,6 +70,7 @@ object Commands {
registerCommand("shtestbingo") { TestBingo.toggle() }
registerCommand("shtestmessage") { TestChatCommand.command(it) }
registerCommand("shshareinquis") { InquisitorWaypointShare.sendInquisitor() }
+ registerCommand("shtestinquisitor") { InquisitorWaypointShare.test() }
}
private fun registerCommand(name: String, function: (Array<String>) -> Unit) {
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 abf402f3e..40ff00a12 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
@@ -25,7 +25,8 @@ import org.lwjgl.input.Keyboard
object InquisitorWaypointShare {
private val config get() = SkyHanniMod.feature.diana.inquisitorSharing
- private val partyPattern = "§9Party §8> (?<playerName>.*)§f: §rx: (?<x>-?[0-9]{1,4}), y: (?<y>-?[0-9]{1,4}), z: (?<z>-?[0-9]{1,4})\\b".toPattern()
+ private val partyPattern =
+ "§9Party §8> (?<playerName>.*)§f: §rx: (?<x>-?[0-9]{1,4}), y: (?<y>-?[0-9]{1,4}), z: (?<z>-?[0-9]{1,4})\\b".toPattern()
private val diedPattern = "§9Party §8> (?<playerName>.*)§f: §rInquisitor dead!".toPattern()
private var time = 0L
@@ -41,6 +42,13 @@ object InquisitorWaypointShare {
var waypoints = mapOf<String, LorenzVec>()
+ private var test = false
+
+ fun test() {
+ test = !test
+ LorenzUtils.chat("§e[SkyHanni] Inquisitor Test " + if (test) "Enabled" else "Disabled")
+ }
+
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (event.phase != TickEvent.Phase.START) return
@@ -61,10 +69,6 @@ object InquisitorWaypointShare {
fun onChatMessage(event: LorenzChatEvent) {
if (!isEnabled()) return
val message = event.message
- // TODO use inquisitor
-// if (message.endsWith("§r§eYou dug out §r§2a Minotaur§r§e!")) {
-
-
if (message.contains("§eYou dug out")) {
testTime = System.currentTimeMillis()
lastInquisitorMessage = message
@@ -95,10 +99,10 @@ object InquisitorWaypointShare {
val entity = event.entity
if (entity !is EntityOtherPlayerMP) return
val name = entity.name
- // TODO change
- if (name != "Minos Inquisitor" && name != "Minotaur " && name != "Minos Champion") {
-// if (name != "Minos Inquisitor") {
- return
+ if (test) {
+ if (name != "Minos Inquisitor" && name != "Minotaur " && name != "Minos Champion") return
+ } else {
+ if (name != "Minos Inquisitor") return
}
logger.log("FOUND: $name")