aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-21 14:41:53 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-21 14:41:53 +0100
commit6cc2646eaaec81581ec4914f3a656578323ead28 (patch)
tree7856da64b7ae34c28b0f913baf053156c97228dc /src/main
parent5ec63533e3eab6f5a1f62038f387d49f613216da (diff)
downloadskyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.gz
skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.bz2
skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.zip
Added skill and collection level as item stack.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt30
2 files changed, 34 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
index d1a42c252..f4df59580 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java
@@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.config.core.config.annotations.*;
import com.google.gson.annotations.Expose;
import java.util.ArrayList;
-import java.util.Collections;
+import java.util.Arrays;
import java.util.List;
public class Inventory {
@@ -103,10 +103,12 @@ public class Inventory {
"§bMinion Tier",
"§bCrimson Armor",
"§bWishing Compass",
- "§bKuudra Key"
+ "§bKuudra Key",
+ "§bSkill Level",
+ "§bCollection Level"
}
)
- public List<Integer> itemNumberAsStackSize = new ArrayList<>(Collections.singletonList(3));
+ public List<Integer> itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9));
@Expose
@ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the Sack name.")
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 a8825354b..2fe34d105 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -6,8 +6,10 @@ import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils
import at.hannibal2.skyhanni.utils.ItemUtils.cleanName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
+import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LorenzUtils.between
import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal
+import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNeeded
import at.hannibal2.skyhanni.utils.StringUtils.matchRegex
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -104,7 +106,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(7)) {
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(8)) {
if (name.contains("Kuudra Key")) {
return when (name) {
"Kuudra Key" -> "§a1"
@@ -116,6 +118,32 @@ class ItemDisplayOverlayFeatures {
}
}
}
+
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(9)) {
+ if (InventoryUtils.openInventoryName() == "Your Skills") {
+ if (item.getLore().any { it.contains("Click to view!") }) {
+ item.name?.let {
+ if (!it.contains("Dungeon")) {
+ val text = it.split(" ").last()
+ return "" + text.romanToDecimalIfNeeded()
+ }
+ }
+ }
+ }
+ }
+
+ if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(10)) {
+ if (InventoryUtils.openInventoryName().endsWith(" Collections")) {
+ if (item.getLore().any { it.contains("Click to view!") }) {
+ item.name?.let {
+ if (it.startsWith("§e")) {
+ val text = it.split(" ").last()
+ return "" + text.romanToDecimalIfNeeded()
+ }
+ }
+ }
+ }
+ }
return ""
}