aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-28 15:28:34 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-28 15:28:34 +0200
commita967d76590f7970bc5d67914c55b98b34307f9d8 (patch)
treeff63d179bd94303e06a87d1ea840889a65203c46 /src/main/java/at/hannibal2/skyhanni/features
parent586947cbea3603fa1c89d4298a18c7a145f92704 (diff)
downloadskyhanni-a967d76590f7970bc5d67914c55b98b34307f9d8.tar.gz
skyhanni-a967d76590f7970bc5d67914c55b98b34307f9d8.tar.bz2
skyhanni-a967d76590f7970bc5d67914c55b98b34307f9d8.zip
fixed lava fishing sack name
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index 6ff33fd86..bc1d310cc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -78,10 +78,7 @@ class ItemDisplayOverlayFeatures {
if (SkyHanniMod.feature.inventory.displaySackName) {
if (ItemUtils.isSack(name)) {
- //TODO fix this and replace other
-// val sackName = grabSackName(name)
- val split = name.split(" ")
- val sackName = split[split.size - 2]
+ val sackName = grabSackName(name)
return (if (name.contains("Enchanted")) "ยง5" else "") + sackName.substring(0, 2)
}
}
@@ -89,12 +86,12 @@ class ItemDisplayOverlayFeatures {
return ""
}
-// private fun grabSackName(name: String): String {
-// val split = name.split(" ")
-// val text = split[0]
-// for (line in arrayOf("Large", "Medium", "Small", "Enchanted")) {
-// if (text == line) return grabSackName(name.substring(text.length + 1))
-// }
-// return text
-// }
+ private fun grabSackName(name: String): String {
+ val split = name.split(" ")
+ val text = split[0]
+ for (line in arrayOf("Large", "Medium", "Small", "Enchanted")) {
+ if (text == line) return grabSackName(name.substring(text.length + 1))
+ }
+ return text
+ }
} \ No newline at end of file