aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorConutik <60240193+Conutik@users.noreply.github.com>2024-03-10 23:19:41 +0300
committerGitHub <noreply@github.com>2024-03-10 21:19:41 +0100
commitde2cd8b5cb0020471e3120a5dac4e8bbd9b3150b (patch)
tree5b93d1d9e891601646557f8f99bf5edfaa4383e9 /src/main/java/at/hannibal2/skyhanni/features
parent33dc30ea4ee00afd97d28b5dbffc3f5f57d2473f (diff)
downloadskyhanni-de2cd8b5cb0020471e3120a5dac4e8bbd9b3150b.tar.gz
skyhanni-de2cd8b5cb0020471e3120a5dac4e8bbd9b3150b.tar.bz2
skyhanni-de2cd8b5cb0020471e3120a5dac4e8bbd9b3150b.zip
Feature: Show available/missing classes (#1111)
Co-authored-by: calwolfson <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
index 9c352a459..05104ce8a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
@@ -14,6 +14,7 @@ import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary
import at.hannibal2.skyhanni.utils.RenderUtils.highlight
+import at.hannibal2.skyhanni.utils.StringUtils.createCommaSeparatedList
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import net.minecraft.client.gui.inventory.GuiChest
@@ -148,22 +149,28 @@ class DungeonFinderFeatures {
@SubscribeEvent
fun onItemTooltip(event: LorenzToolTipEvent) {
if (!LorenzUtils.inSkyBlock) return
- if (!config.coloredClassLevel) return
val chestName = InventoryUtils.openInventoryName()
if (chestName != "Party Finder") return
val stack = event.itemStack
+ val classNames = mutableListOf("Healer", "Mage", "Berserk", "Archer", "Tank")
for ((index, line) in stack.getLore().withIndex()) {
classLevelPattern.matchMatcher(line) {
val playerName = group("playerName")
val className = group("className")
val level = group("level").toInt()
val color = getColor(level)
- event.toolTip[index + 1] = " §b$playerName§f: §e$className $color$level"
+ if (config.coloredClassLevel) event.toolTip[index + 1] = " §b$playerName§f: §e$className $color$level"
+ classNames.remove(className)
}
}
+ if (!config.showMissingClasses) return
+ if (!stack.getLore()[0].removeColor().startsWith("Dungeon:")) return
+ if (classNames.contains(selectedClass)) classNames[classNames.indexOf(selectedClass)] = "§a${selectedClass}§7"
+ event.toolTip.add("")
+ event.toolTip.add("§cMissing: §7" + createCommaSeparatedList(classNames))
}
@SubscribeEvent