Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Exp in Superpairs as Stack Size. #1988

Merged
merged 6 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ public enum ItemNumberEntry implements HasLegacyId {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ 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
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.DARK_CACAO_TRUFFLE
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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
Loading