From 3971a5bff7b1ad8c57fb00d1920acbc94309801a Mon Sep 17 00:00:00 2001 From: Serhan Date: Sat, 2 Sep 2023 11:52:43 +0300 Subject: new Gemstone Slot Unlock Cost line for Estimated Item Value feature (#408) new Gemstone Slot Unlock Cost line for Estimated Item Value feature #408 --- .../skyhanni/utils/SkyBlockItemModifierUtils.kt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt index c87941766..0cf1d3b32 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/SkyBlockItemModifierUtils.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import com.google.gson.JsonObject import net.minecraft.item.ItemStack +import java.util.* object SkyBlockItemModifierUtils { private val drillPartTypes = listOf("drill_part_upgrade_module", "drill_part_engine", "drill_part_fuel_tank") @@ -263,4 +264,27 @@ object SkyBlockItemModifierUtils { fun getByName(name: String) = entries.firstOrNull { it.name == name } } } + + enum class GemstoneSlotType(val colorCode: Char) { + JADE('a'), + AMBER('6'), + TOPAZ('e'), + SAPPHIRE('b'), + AMETHYST('5'), + JASPER('d'), + RUBY('c'), + OPAL('f'), + COMBAT('4'), + OFFENSIVE('9'), + DEFENSIVE('a'), + MINING('5'), + UNIVERSAL('f') + ; + + companion object { + fun getColorCode(name: String) = entries.stream().filter { + name.uppercase(Locale.ENGLISH).contains(it.name) + }.findFirst().get().colorCode + } + } } \ No newline at end of file -- cgit