Skip to content

Commit 33f99f8

Browse files
style: Add more key information to KuudraChestProfit
1 parent 4cb6901 commit 33f99f8

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/main/kotlin/gg/skytils/skytilsmod/features/impl/crimson/KuudraChestProfit.kt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ object KuudraChestProfit {
6363
chestType.addItem(lootSlot)
6464
}
6565
if (key != null && Skytils.config.kuudraChestProfitCountsKey) {
66-
val keyCost = key.getPrice(KuudraFeatures.myFaction ?: error("Failed to get Crimson Faction"))
67-
chestType.items.add(KuudraChestLootItem(1, key.displayName, -keyCost))
66+
val faction = KuudraFeatures.myFaction ?: error("Failed to get Crimson Faction")
67+
val keyCost = key.getPrice(faction)
68+
chestType.items.add(KuudraChestLootItem(1, "${key.rarity.baseColor}${key.displayName} §7(${faction.color}${faction.identifier}§7)", -keyCost))
6869
chestType.value -= keyCost
6970
}
7071
}
@@ -224,12 +225,12 @@ object KuudraChestProfit {
224225
}
225226
}
226227

227-
enum class KuudraKey(val displayName: String, val coinCost: Int, val materialCost: Int) {
228-
BASIC("Kuudra Key", 200000, 2),
229-
HOT("Hot Kuudra Key", 400000, 6),
230-
BURNING("Burning Kuudra Key", 750000, 20),
231-
FIERY("Fiery Kuudra Key", 1500000, 60),
232-
INFERNAL("Infernal Kuudra Key", 3000000, 120);
228+
enum class KuudraKey(val displayName: String, val rarity: ItemRarity, val coinCost: Int, val materialCost: Int) {
229+
BASIC("Kuudra Key", ItemRarity.RARE, 200000, 2),
230+
HOT("Hot Kuudra Key", ItemRarity.EPIC, 400000, 6),
231+
BURNING("Burning Kuudra Key", ItemRarity.EPIC, 750000, 20),
232+
FIERY("Fiery Kuudra Key", ItemRarity.EPIC, 1500000, 60),
233+
INFERNAL("Infernal Kuudra Key", ItemRarity.LEGENDARY,3000000, 120);
233234

234235
companion object {
235236
// all keys cost 2 CORRUPTED_NETHER_STAR but nether stars are coop-soulbound

src/main/kotlin/gg/skytils/skytilsmod/features/impl/crimson/KuudraFeatures.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package gg.skytils.skytilsmod.features.impl.crimson
2020

21+
import gg.essential.universal.ChatColor
2122
import gg.skytils.skytilsmod.Skytils
2223
import gg.skytils.skytilsmod.Skytils.Companion.client
2324
import gg.skytils.skytilsmod.Skytils.Companion.domain
@@ -105,9 +106,10 @@ object KuudraFeatures {
105106
)
106107
}
107108

108-
enum class CrimsonFaction(val keyMaterial: String) {
109-
BARBARIAN("ENCHANTED_RED_SAND"),
110-
MAGE("ENCHANTED_MYCELIUM");
109+
enum class CrimsonFaction(val color: ChatColor, val keyMaterial: String) {
110+
BARBARIAN(ChatColor.RED, "ENCHANTED_RED_SAND"),
111+
MAGE(ChatColor.DARK_PURPLE, "ENCHANTED_MYCELIUM");
111112

112113
val displayName = name.toTitleCase()
114+
val identifier = name.first().uppercase()
113115
}

0 commit comments

Comments
 (0)