aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-11 10:06:57 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-11 10:06:57 +0100
commit8ee609dbba93a0e2d46b887fa5f605a023dd77f5 (patch)
treeced3a061e99bcbe4e2eca6f103a8f6b353cc06e5 /src/main
parent2555c80da022c5ba005056fcd73bb97d4a60cdd0 (diff)
downloadskyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.tar.gz
skyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.tar.bz2
skyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.zip
Added debug command /shtestburrow
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt36
2 files changed, 41 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 f958591c1..dd08c4f93 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -16,6 +16,7 @@ import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil
import at.hannibal2.skyhanni.features.commands.PartyCommands
import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper
import at.hannibal2.skyhanni.features.event.diana.DianaProfitTracker
+import at.hannibal2.skyhanni.features.event.diana.GriffinBurrowHelper
import at.hannibal2.skyhanni.features.event.diana.InquisitorWaypointShare
import at.hannibal2.skyhanni.features.event.diana.MythologicalCreatureTracker
import at.hannibal2.skyhanni.features.event.jerry.frozentreasure.FrozenTreasureTracker
@@ -308,6 +309,10 @@ object Commands {
"shconfigsave",
"Manually saving the config"
) { SkyHanniMod.configManager.saveConfig(ConfigFileType.FEATURES, "manual-command") }
+ registerCommand(
+ "shtestburrow",
+ "Sets a test burrow waypoint at your location"
+ ) { GriffinBurrowHelper.setTestBurrow(it) }
}
private fun developersCodingHelp() {
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 b611f77ee..ad9a482bc 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
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.data.EntityMovementData
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.BurrowDetectEvent
import at.hannibal2.skyhanni.events.BurrowDugEvent
import at.hannibal2.skyhanni.events.BurrowGuessEvent
@@ -18,6 +19,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
+import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.LorenzVec
import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine
import at.hannibal2.skyhanni.utils.RenderUtils.drawColor
@@ -246,4 +248,38 @@ object GriffinBurrowHelper {
}
private fun isEnabled() = DianaAPI.isDoingDiana()
+
+ fun setTestBurrow(strings: Array<String>) {
+ if (!IslandType.HUB.isInIsland()) {
+ LorenzUtils.userError("You can only create test burrows on the hub island!")
+ return
+ }
+
+ if (strings.size != 1) {
+ LorenzUtils.userError("/shtestburrow <type>")
+ return
+ }
+
+ val type: BurrowType = when (strings[0].lowercase()) {
+ "reset" -> {
+ particleBurrows = emptyMap()
+ update()
+ LorenzUtils.chat("Manually reset all burrow waypoints.")
+ return
+ }
+ "1", "start" -> BurrowType.START
+ "2", "mob" -> BurrowType.MOB
+ "3", "treasure" -> BurrowType.TREASURE
+ else -> {
+ LorenzUtils.userError("Unknown burrow type! Try 1-3 instead.")
+ return
+ }
+ }
+
+
+ EntityMovementData.addToTrack(Minecraft.getMinecraft().thePlayer)
+ val location = LocationUtils.playerLocation().roundLocation()
+ particleBurrows = particleBurrows.editCopy { this[location] = type }
+ update()
+ }
}