From 1c0090ec301b87edebc29453287e585f88de2c4f Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 30 Dec 2024 21:48:56 +0100 Subject: feat: Add auto generated ItemIds class --- src/main/kotlin/moe/nea/ledger/ItemId.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/moe/nea/ledger/ItemId.kt') diff --git a/src/main/kotlin/moe/nea/ledger/ItemId.kt b/src/main/kotlin/moe/nea/ledger/ItemId.kt index 6be23fb..f4786cd 100644 --- a/src/main/kotlin/moe/nea/ledger/ItemId.kt +++ b/src/main/kotlin/moe/nea/ledger/ItemId.kt @@ -1,7 +1,6 @@ package moe.nea.ledger -@JvmInline -value class ItemId( +data class ItemId( val string: String ) { fun singleItem(): Pair { @@ -14,11 +13,15 @@ value class ItemId( companion object { + + @JvmStatic + fun forName(string: String) = ItemId(string) fun skill(skill: String) = ItemId("SKYBLOCK_SKILL_$skill") val GARDEN = skill("GARDEN") val FARMING = skill("FARMING") + val ARCHFIEND_DYE = ItemId("DYE_ARCHFIEND") val ARCHFIEND_HIGH_CLASS = ItemId("HIGH_CLASS_ARCHFIEND_DICE") val ARCHFIEND_LOW_CLASS = ItemId("ARCHFIEND_DICE") -- cgit