aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt38
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt2
2 files changed, 39 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 1c17d38f6..6a9ef7c8c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -5,6 +5,8 @@ import at.hannibal2.skyhanni.config.features.garden.visitor.VisitorConfig.Highli
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.SackAPI
import at.hannibal2.skyhanni.data.SackStatus
+import at.hannibal2.skyhanni.events.BurrowGuessEvent
+import at.hannibal2.skyhanni.events.DebugDataCollectEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -605,6 +607,42 @@ class GardenVisitorFeatures {
}
@SubscribeEvent
+ fun onBurrowGuess(event: BurrowGuessEvent) {
+ LorenzUtils.chat("gues the burrow!!")
+ }
+
+ @SubscribeEvent
+ fun onDebugDataCollect(event: DebugDataCollectEvent) {
+ event.title("Garden Visitor Stats")
+
+ if (!GardenAPI.inGarden()) {
+ event.ignore("not in garden")
+ return
+ }
+
+ event.addData {
+ val visitors = VisitorAPI.visitors
+
+ add("visitors: ${visitors.size}")
+
+ for (visitor in visitors.values) {
+ add(" ")
+ add("visitorName: '${visitor.visitorName}'")
+ add("status: '${visitor.status}'")
+ if (visitor.inSacks) {
+ add("inSacks!")
+ }
+ if (visitor.shoppingList.isNotEmpty()) {
+ add("shoppingList: '${visitor.shoppingList}'")
+ }
+ visitor.offer?.offerItem?.getInternalName()?.let {
+ add("offer: '${it}'")
+ }
+ }
+ }
+ }
+
+ @SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(3, "garden.visitorNeedsDisplay", "garden.visitors.needs.display")
event.move(3, "garden.visitorNeedsPos", "garden.visitors.needs.pos")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
index c3c832d78..4d892528a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt
@@ -16,7 +16,7 @@ import at.hannibal2.skyhanni.utils.NEUInternalName
import net.minecraft.item.ItemStack
object VisitorAPI {
- private var visitors = mapOf<String, Visitor>()
+ var visitors = mapOf<String, Visitor>()
var inInventory = false
val config get() = GardenAPI.config.visitors
private val logger = LorenzLogger("garden/visitors/api")