From 5d1bc5e15e7e71c91954154a1c1d1db42651f933 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 11 Apr 2023 02:45:38 +0200 Subject: Add support for more garden tools --- .../at/hannibal2/skyhanni/features/garden/GardenAPI.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index 086c31d66..c7df35877 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -67,7 +67,21 @@ class GardenAPI { if (crop != null) return crop.cropName val internalName = toolItem?.getInternalName() ?: return null - return if (internalName.startsWith("DAEDALUS_AXE")) "Other Tool" else null + return if (isOtherTool(internalName)) internalName else null + } + + private fun isOtherTool(internalName: String): Boolean { + if (internalName.startsWith("DAEDALUS_AXE")) return true + + if (internalName.startsWith("BASIC_GARDENING_HOE")) return true + if (internalName.startsWith("ADVANCED_GARDENING_AXE")) return true + + if (internalName.startsWith("BASIC_GARDENING_AXE")) return true + if (internalName.startsWith("ADVANCED_GARDENING_HOE")) return true + + if (internalName.startsWith("ROOKIE_HOE")) return true + + return false } @SubscribeEvent(priority = EventPriority.LOW) -- cgit