diff options
author | saga <45262877+saga-00@users.noreply.github.com> | 2024-08-26 06:38:55 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-26 11:38:55 +0200 |
commit | 085fdbe16121954c44d30501f9a4fe4852e6e998 (patch) | |
tree | 04a09bf08607384ab5f3050b00cc19eabd191c31 | |
parent | 81e8c4c0a62e1ad899a6fee612d8987814bb2c30 (diff) | |
download | skyhanni-085fdbe16121954c44d30501f9a4fe4852e6e998.tar.gz skyhanni-085fdbe16121954c44d30501f9a4fe4852e6e998.tar.bz2 skyhanni-085fdbe16121954c44d30501f9a4fe4852e6e998.zip |
Feature: Exp in Superpairs as Stack Size. (#1988)
Co-authored-by: Cal <cwolfson58@gmail.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 21 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 0c7556c30..e7609135e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -146,9 +146,10 @@ public class InventoryConfig { BOTTLE_OF_JYRRE("§bBottle Of Jyrre", 15), DARK_CACAO_TRUFFLE("§bDark Cacao Truffle"), EDITION_NUMBER("§bEdition Number", 16), + ENCHANTING_EXP("§bEnchanting EXP (Superpairs)"), BINGO_GOAL_RANK("§bBingo Goal Rank"), SKYBLOCK_LEVEL("§bSkyblock Level"), - BESTIARY_LEVEL("§bBestiary Level") + BESTIARY_LEVEL("§bBestiary Level"), ; private final String str; 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 2cb5632f1..43448f8d8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.api.CollectionAPI import at.hannibal2.skyhanni.api.SkillAPI import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry +import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.BESTIARY_LEVEL import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.BINGO_GOAL_RANK import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.BOTTLE_OF_JYRRE import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.COLLECTION_LEVEL @@ -12,6 +13,7 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.DUNGEON_HEAD_FLOOR_NUMBER import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.DUNGEON_POTION_LEVEL import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.EDITION_NUMBER +import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.ENCHANTING_EXP import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.KUUDRA_KEY import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.LARVA_HOOK import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.MASTER_SKULL_TIER @@ -23,7 +25,6 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKILL_LEVEL import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKYBLOCK_LEVEL import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.VACUUM_GARDEN -import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.BESTIARY_LEVEL import at.hannibal2.skyhanni.data.PetAPI import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -96,7 +97,16 @@ object ItemDisplayOverlayFeatures { ) private val bestiaryStackPattern by patternGroup.pattern( "bestiarystack", - "§7Progress to Tier (?<tier>[\\dIVXC]+): §b[\\d.]+%" + "§7Progress to Tier (?<tier>[\\dIVXC]+): §b[\\d.]+%", + ) + + /** + * REGEX-TEST: 5k Enchanting Exp + * REGEX-TEST: 5.5k Enchanting Exp + */ + private val enchantingExpPattern by patternGroup.pattern( + "enchantingexp", + "(?<exp>.*)k Enchanting Exp", ) @SubscribeEvent @@ -299,6 +309,13 @@ object ItemDisplayOverlayFeatures { } } + if (ENCHANTING_EXP.isSelected() && chestName.startsWith("Superpairs")) { + enchantingExpPattern.matchMatcher(item.cleanName()) { + val exp = group("exp").formatLong() + return "§b${exp.shortFormat()}" + } + } + return null } |