diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 14:41:53 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 14:41:53 +0100 |
commit | 6cc2646eaaec81581ec4914f3a656578323ead28 (patch) | |
tree | 7856da64b7ae34c28b0f913baf053156c97228dc | |
parent | 5ec63533e3eab6f5a1f62038f387d49f613216da (diff) | |
download | skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.gz skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.tar.bz2 skyhanni-6cc2646eaaec81581ec4914f3a656578323ead28.zip |
Added skill and collection level as item stack.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | FEATURES.md | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 30 |
4 files changed, 36 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a0e774348..d4e6236c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Features + Added **Time to Kill** - Show the time it takes to kill the Slayer boss. ++ Added skill and collection level as item stack. ### Garden Features + Added **Copper Price** - Show copper to coin prices inside the Sky Mart inventory. diff --git a/FEATURES.md b/FEATURES.md index ff1389a80..b04fb1a3b 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -46,7 +46,7 @@ ## Inventory - Not Clickable Items: Mark items gray in your inventory when they are not supposed to be moved in certain GUIs, and make green lines around items that meet that requirement. (in NPC sell inventories, ender chests and backpacks, salvaging in the dungeon hub, player trade, bazaar, action house, accessory bag, sack of sacks, fishing bag, potion bag, chests on the private island, attribute fusion and equipment GUI) - Option to change the gray-out opacity for 'Not Clickable Items'. -- Set stack number for specific items (stars for crimson armor, minion tier, pet level, new year cake, for golden and diamond dungeon heads the floor number, the tier of master skull and master star, kuudra keys) +- Set stack number for specific items (stars for crimson armor, minion tier, pet level, new year cake, for golden and diamond dungeon heads the floor number, the tier of master skull and master star, kuudra keys, skill level, and collection level) - Sack name (show short name of sacks) - Anvil Combine Helper (When putting an enchanted book into the first slot of the anvil, all items with the same enchantment are highlighted in the inventory) - Added compact star counter on all items (not only on items with dungeon stars and master stars but also on crimson armors, cloaks and fishing rods) 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 "" } |